PetaVision  Alpha
CloneConn.cpp
1 /* CloneConn.cpp
2  *
3  * Created on: May 23, 2011
4  * Author: peteschultz
5  */
6 
7 #include "CloneConn.hpp"
8 #include "columns/HyPerCol.hpp"
9 #include "components/CloneWeightsPair.hpp"
10 #include "components/DependentArborList.hpp"
11 #include "components/DependentPatchSize.hpp"
12 #include "components/DependentSharedWeights.hpp"
13 #include "delivery/CloneDeliveryFacade.hpp"
14 
15 namespace PV {
16 
17 CloneConn::CloneConn(char const *name, HyPerCol *hc) { initialize(name, hc); }
18 
19 CloneConn::CloneConn() {}
20 
21 CloneConn::~CloneConn() {}
22 
23 int CloneConn::initialize(char const *name, HyPerCol *hc) {
24  int status = HyPerConn::initialize(name, hc);
25  return status;
26 }
27 
28 void CloneConn::defineComponents() {
29  HyPerConn::defineComponents();
30  mOriginalConnNameParam = createOriginalConnNameParam();
31  if (mOriginalConnNameParam) {
32  addObserver(mOriginalConnNameParam);
33  }
34 }
35 
36 BaseDelivery *CloneConn::createDeliveryObject() { return new CloneDeliveryFacade(name, parent); }
37 
38 ArborList *CloneConn::createArborList() { return new DependentArborList(name, parent); }
39 
40 PatchSize *CloneConn::createPatchSize() { return new DependentPatchSize(name, parent); }
41 
42 SharedWeights *CloneConn::createSharedWeights() { return new DependentSharedWeights(name, parent); }
43 
44 WeightsPairInterface *CloneConn::createWeightsPair() { return new CloneWeightsPair(name, parent); }
45 
46 InitWeights *CloneConn::createWeightInitializer() { return nullptr; }
47 
48 NormalizeBase *CloneConn::createWeightNormalizer() { return nullptr; }
49 
50 BaseWeightUpdater *CloneConn::createWeightUpdater() { return nullptr; }
51 
52 OriginalConnNameParam *CloneConn::createOriginalConnNameParam() {
53  return new OriginalConnNameParam(name, parent);
54 }
55 
56 Response::Status CloneConn::initializeState() { return Response::NO_ACTION; }
57 
58 } // namespace PV
virtual void addObserver(Observer *observer) override