21 #ifdef GENOM_SERIALIZATION
22 #include <boost/archive/binary_iarchive.hpp>
23 #include <boost/archive/binary_oarchive.hpp>
24 #include <boost/serialization/base_object.hpp>
25 #include <boost/serialization/export.hpp>
26 #endif //GENOM_SERIALIZATION
31 #ifdef GENOM_SERIALIZATION
33 #endif //GENOM_SERIALIZATION
53 if(inNet->getSize() != getSize()) {
67 bool inSkipChildConnections)
const throw (
Error) {
71 e.
saveContextData(
"Pointer to parent collection does not exist", parent);
82 if(!inSkipChildConnections) {
86 parent->getConnectedNets(parentConnections,
true);
89 const std::vector<VectorBit<Net>::SizeType>& myIndex = getIndices();
90 for(; connNet != connNetEnd; ++connNet) {
93 cousin = (*connNet)->
get(myIndex);
100 cousin = bChildren[getAbsoluteIndex()];
108 outNets.push_back(cousin);
117 bool inSkipChildConnections)
const {
121 e.
saveContextData(
"Pointer to parent collection does not exist", parent);
132 if(!inSkipChildConnections) {
136 parent->getConnectedPorts(parentConnections,
true);
139 const std::vector<VectorBit<Net>::SizeType>& myIndex =
getIndices();
140 for(; connPort != connPortEnd; ++connPort) {
144 cousin = (*connPort)->
get(myIndex);
155 outPorts.push_back(cousin);
164 bool inSkipChildConnections)
const {
168 e.
saveContextData(
"Pointer to parent collection does not exist", parent);
180 if(!inSkipChildConnections) {
184 parent->getConnectedPortRefs(parentConnections,
true);
187 const std::vector<VectorBit<Net>::SizeType>& myIndex =
getIndices();
188 for(; connPortRef != connPortRefEnd; ++connPortRef) {
192 cousin = (*connPortRef)->
get(myIndex);
203 outPortRefs.push_back(cousin);
215 #ifdef GENOM_SERIALIZATION
216 template <
class Archive>
void VectorNetBit::serialize(Archive& ar,
unsigned int) {
217 ar & boost::serialization::base_object<Net>(*this);
218 ar & boost::serialization::base_object<VectorBit<Net> >(*this);
222 template void VectorNetBit::serialize<boost::archive::binary_iarchive>(
223 boost::archive::binary_iarchive& ar,
const unsigned int);
225 template void VectorNetBit::serialize<boost::archive::binary_oarchive>(
226 boost::archive::binary_oarchive& ar,
const unsigned int);
228 #endif //GENOM_SERIALIZATION
virtual Connection connect(const NetSharedPtr &inNet)=0
Represents a bit of a net array.
virtual void getChildren(List &outChildren) const
virtual CompositionType getCompositionType() const =0
virtual void getConnectedPortRefs(std::vector< PortReferenceSharedPtr > &outPortRefs, bool inSkipChildConnections=false) const
SizeType getAbsoluteIndex() const
Interface for objects that can be composed within each other.
std::list< NetSharedPtr >::iterator Connection
virtual void getConnectedPorts(std::vector< PortSharedPtr > &outPorts, bool inSkipChildConnections=false) const
virtual void getConnectedPorts(std::vector< PortSharedPtr > &outPort, bool inSkipChildConnections=false) const
void runVisitor(_Tp &inoutVisited, BaseVisitor &inoutVisitor)
virtual void getConnectedPortRefs(std::vector< PortReferenceSharedPtr > &outPortRefs, bool inSkipChildConnections=false) const
virtual void disconnect()
The Error object thrown by different methods of EdifOM.
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
boost::shared_ptr< Net > NetSharedPtr
virtual Pointer getParentCollection() const
A base class for Visitor.
void saveContextData(const std::string &inName, const boost::any &inSource)
virtual void disconnect()
virtual void getConnectedNets(std::vector< NetSharedPtr > &outNets, bool inSkipChildConnections=false) const
virtual const Pointer get(const std::vector< SizeType > &inIndices) const =0
const std::vector< SizeType > & getIndices() const
virtual void accept(BaseVisitor &inoutVisitor)
virtual Connection connect(const NetSharedPtr &inNet)
Represents a single element of a vector composition.
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)