PetaVision  Alpha
IdentConn.cpp
1 /*
2  * IdentConn.cpp
3  *
4  * Created on: Nov 17, 2010
5  * Author: pschultz
6  */
7 
8 #include "IdentConn.hpp"
9 #include "delivery/IdentDelivery.hpp"
10 
11 namespace PV {
12 
13 IdentConn::IdentConn() {}
14 
15 IdentConn::IdentConn(const char *name, HyPerCol *hc) { initialize(name, hc); }
16 
17 int IdentConn::initialize(const char *name, HyPerCol *hc) {
18  int status = BaseConnection::initialize(name, hc);
19  return status;
20 }
21 
22 BaseDelivery *IdentConn::createDeliveryObject() {
23  BaseObject *baseObject = Factory::instance()->createByKeyword("IdentDelivery", name, parent);
24  IdentDelivery *deliveryObject = dynamic_cast<IdentDelivery *>(baseObject);
25  pvAssert(deliveryObject);
26  return deliveryObject;
27 }
28 
29 void IdentConn::defineComponents() {
30  BaseConnection::defineComponents();
31  mSingleArbor = createSingleArbor();
32  if (mSingleArbor) {
33  addObserver(mSingleArbor);
34  }
35 }
36 
37 SingleArbor *IdentConn::createSingleArbor() { return new SingleArbor(name, parent); }
38 
39 } // end of namespace PV block
virtual void addObserver(Observer *observer) override