16 #ifndef TORC_GENERIC_CLONING_HPP
17 #define TORC_GENERIC_CLONING_HPP
23 #include <boost/bind.hpp>
24 #include <boost/shared_ptr.hpp>
57 template <
typename _Tp>
class Copier;
63 template <
typename _Tp> boost::shared_ptr<_Tp>
clone(
const boost::shared_ptr<_Tp>& inPointer,
97 template <
typename _Tp>
class Copier {
132 inSource->accept(*
this);
141 rootPtr->setComments(inRoot.getComments());
142 rootPtr->setName(inRoot.getName());
143 rootPtr->setOriginalName(inRoot.getOriginalName());
144 rootPtr->setLevel(inRoot.getLevel());
145 rootPtr->setVersion(inRoot.getVersion());
147 std::vector<StatusSharedPtr> outStatus;
148 inRoot.getStatuses(outStatus);
149 for(std::vector<StatusSharedPtr>::iterator it = outStatus.begin();
150 it != outStatus.end(); ++it) {
152 rootPtr->addStatus(clonedStatus);
155 std::vector<LibrarySharedPtr> libraries;
156 inRoot.getLibraries(libraries);
157 std::vector<LibrarySharedPtr>::iterator libIt = libraries.begin();
158 for(; libIt != libraries.end(); ++libIt) {
160 rootPtr->addLibrary(newLib);
163 std::vector<DesignSharedPtr> outDesigns;
164 inRoot.getDesigns(outDesigns);
165 for(std::vector<DesignSharedPtr>::iterator it = outDesigns.begin();
166 it != outDesigns.end(); ++it) {
168 rootPtr->addDesign(newDesign);
198 inSource->accept(*
this);
207 designPtr->setComments(inDesign.getComments());
208 designPtr->setName(inDesign.getName());
209 designPtr->setOriginalName(inDesign.getOriginalName());
210 designPtr->setParent(inDesign.getParent());
211 designPtr->setCellRefName(inDesign.getCellRefName());
212 designPtr->setLibraryRefName(inDesign.getLibraryRefName());
214 std::list < std::string > userData;
215 inDesign.getUserData(userData);
216 designPtr->setUserData(userData);
218 std::vector<StatusSharedPtr> outStatus;
219 inDesign.getStatuses(outStatus);
220 for(std::vector<StatusSharedPtr>::iterator it = outStatus.begin(); it != outStatus.end();
223 designPtr->addStatus(clonedStatus);
226 std::map<std::string, PropertySharedPtr> outProperties;
227 std::vector<PropertySharedPtr> properties;
228 inDesign.getProperties(outProperties);
229 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
230 it != outProperties.end(); ++it) {
232 properties.push_back(clonedProperty);
234 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
235 it != properties.end(); ++it) {
236 designPtr->setProperty((*it)->getName(), *it);
266 inSource->accept(*
this);
275 libPtr->setComments(inLibrary.getComments());
276 libPtr->setIsExtern(inLibrary.getIsExtern());
277 libPtr->setName(inLibrary.getName());
278 libPtr->setParent(inLibrary.getParent());
280 std::list < std::string > userData;
281 inLibrary.getUserData(userData);
282 libPtr->setUserData(userData);
284 std::vector<StatusSharedPtr> outStatus;
285 inLibrary.getStatuses(outStatus);
286 for(std::vector<StatusSharedPtr>::iterator it = outStatus.begin(); it != outStatus.end();
289 libPtr->addStatus(clonedStatus);
292 std::map<Unit, ScaleFactor> outScaleFactors;
293 outScaleFactors = inLibrary.getScaleFactors();
294 std::map<Unit, ScaleFactor>::iterator it = outScaleFactors.begin();
295 for(; it != outScaleFactors.end(); ++it) {
296 libPtr->setScaleFactor((*it).first, (*it).second);
298 libPtr->setLevel(inLibrary.getLevel());
299 libPtr->setOriginalName(inLibrary.getOriginalName());
300 std::vector<CellSharedPtr> outCells;
301 inLibrary.getCells(outCells);
302 std::vector<CellSharedPtr>::iterator cellIt = outCells.begin();
303 for(; cellIt != outCells.end(); ++cellIt) {
305 libPtr->addCell(newCell);
311 libPtr->setSimulationInfo(clonedSimuInfo);
341 inSource->accept(*
this);
349 cellPtr->setComments(inCell.getComments());
351 std::list < std::string > userData;
352 inCell.getUserData(userData);
353 cellPtr->setUserData(userData);
355 std::vector<StatusSharedPtr> outStatus;
356 inCell.getStatuses(outStatus);
357 for(std::vector<StatusSharedPtr>::iterator it = outStatus.begin();
358 it != outStatus.end(); ++it) {
360 cellPtr->addStatus(clonedStatus);
363 cellPtr->setIsExtern(inCell.getIsExtern());
364 cellPtr->setName(inCell.getName());
365 cellPtr->setParent(inCell.getParent());
367 std::map<std::string, PropertySharedPtr> outProperties;
368 std::vector<PropertySharedPtr> properties;
369 inCell.getProperties(outProperties);
370 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
371 it != outProperties.end(); ++it) {
373 properties.push_back(clonedProperty);
375 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
376 it != properties.end(); ++it) {
377 cellPtr->setProperty((*it)->getName(), *it);
380 cellPtr->setType(inCell.getType());
381 cellPtr->setOriginalName(inCell.getOriginalName());
382 std::vector<ViewSharedPtr> outViews;
383 inCell.getViews(outViews);
384 std::vector<ViewSharedPtr>::iterator viewIt = outViews.begin();
385 for(; viewIt != outViews.end(); ++viewIt) {
387 cellPtr->addView(newView);
416 inSource->accept(*
this);
424 statusPtr->setComments(inStatus.getComments());
426 std::list < std::string > userData;
427 inStatus.getUserData(userData);
428 statusPtr->setUserData(userData);
430 std::vector<WrittenSharedPtr> outWrittens;
431 inStatus.getWrittens(outWrittens);
432 for(std::vector<WrittenSharedPtr>::iterator it = outWrittens.begin();
433 it != outWrittens.end(); ++it) {
437 newWritten->setComments(written->getComments());
439 std::list < std::string > userData;
440 written->getUserData(userData);
441 newWritten->setUserData(userData);
443 std::map<std::string, PropertySharedPtr> outProperties;
444 std::vector<PropertySharedPtr> properties;
445 written->getProperties(outProperties);
446 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
447 it != outProperties.end(); ++it) {
449 properties.push_back(clonedProperty);
451 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
452 it != properties.end(); ++it) {
453 newWritten->setProperty((*it)->getName(), *it);
456 newWritten->setTimeStamp(written->getTimeStamp());
457 newWritten->setAuthorName(written->getAuthorName());
458 newWritten->setProgramName(written->getProgramName());
459 newWritten->setProgramVersion(written->getProgramVersion());
460 newWritten->setDataOriginLocationName(written->getDataOriginLocationName());
461 newWritten->setDataOriginVersion(written->getDataOriginVersion());
462 statusPtr->addWritten(newWritten);
492 inSource->accept(*
this);
500 simuInfoPtr->setComments(inSimulationInfo.getComments());
502 std::list < std::string > userData;
503 inSimulationInfo.getUserData(userData);
504 simuInfoPtr->setUserData(userData);
506 simuInfoPtr->setParent(inSimulationInfo.getParent());
508 std::vector<LogicValueSharedPtr> outLogicValues;
509 inSimulationInfo.getLogicValues(outLogicValues);
510 for(std::vector<LogicValueSharedPtr>::iterator it = outLogicValues.begin();
511 it != outLogicValues.end(); ++it) {
513 simuInfoPtr->addLogicValue(newLogicVal);
543 inSource->accept(*
this);
551 logicValPtr->setName(inLogicValue.getName());
552 logicValPtr->setOriginalName(inLogicValue.getOriginalName());
553 logicValPtr->setParent(inLogicValue.getParent());
554 logicValPtr->setComments(inLogicValue.getComments());
556 std::map<std::string, PropertySharedPtr> outProperties;
557 std::vector<PropertySharedPtr> properties;
558 inLogicValue.getProperties(outProperties);
559 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
560 it != outProperties.end(); ++it) {
562 properties.push_back(clonedProperty);
564 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
565 it != properties.end(); ++it) {
566 logicValPtr->setProperty((*it)->getName(), *it);
569 std::list < std::string > userData;
570 inLogicValue.getUserData(userData);
571 logicValPtr->setUserData(userData);
575 if(attrib->getIsVoltageMapSet()) {
576 newAttrib->setVoltageMap(attrib->getVoltageMap());
578 if(attrib->getIsCurrentMapSet()) {
579 newAttrib->setCurrentMap(attrib->getCurrentMap());
581 if(attrib->getIsBooleanMapSet()) {
582 newAttrib->setBooleanMap(attrib->getBooleanMap());
585 if(attrib->getWeakLogicValue()) {
587 attrib->getWeakLogicValue()->getName());
588 newAttrib->setWeakLogicValue(logicVal);
590 if(attrib->getStrongLogicValue()) {
592 attrib->getStrongLogicValue()->getName());
593 newAttrib->setStrongLogicValue(logicVal);
596 std::list<LogicValueSharedPtr> outLogicValues;
597 attrib->getCompoundLogicValues(outLogicValues);
598 std::list<LogicValueSharedPtr> logicValues;
599 for(std::list<LogicValueSharedPtr>::iterator it = outLogicValues.begin();
600 it != outLogicValues.end(); ++it) {
602 logicValues.push_back(logicVal);
604 newAttrib->setCompoundLogicValues(logicValues);
607 std::list<LogicValueSharedPtr> outLogicValues;
608 attrib->getDominatedLogicValues(outLogicValues);
609 std::list<LogicValueSharedPtr> logicValues;
610 for(std::list<LogicValueSharedPtr>::iterator it = outLogicValues.begin();
611 it != outLogicValues.end(); ++it) {
613 logicValues.push_back(logicVal);
615 newAttrib->setDominatedLogicValues(logicValues);
618 std::list<LogicValueSharedPtr> outLogicValues;
619 attrib->getResolvedLogicValues(outLogicValues);
620 std::list<LogicValueSharedPtr> logicValues;
621 for(std::list<LogicValueSharedPtr>::iterator it = outLogicValues.begin();
622 it != outLogicValues.end(); ++it) {
624 logicValues.push_back(logicVal);
626 newAttrib->setResolvedLogicValues(logicValues);
628 if(attrib->getIsIsolated()) {
629 newAttrib->setIsIsolated(attrib->getIsIsolated());
633 std::list<LogicMap*> outLogicMaps;
634 attrib->getLogicMaps(outLogicMaps);
635 for(std::list<LogicMap*>::iterator it = outLogicMaps.begin();
636 it != outLogicMaps.end(); ++it) {
641 newAttrib->addLogicMap(logicMap);
644 logicValPtr->setAttributes(newAttrib);
673 inSource->accept(*
this);
681 viewPtr->setComments(inView.getComments());
683 std::list < std::string > userData;
684 inView.getUserData(userData);
685 viewPtr->setUserData(userData);
687 std::vector<StatusSharedPtr> outStatus;
688 inView.getStatuses(outStatus);
689 for(std::vector<StatusSharedPtr>::iterator it = outStatus.begin();
690 it != outStatus.end(); ++it) {
692 viewPtr->addStatus(clonedStatus);
695 viewPtr->setIsExtern(inView.getIsExtern());
696 viewPtr->setName(inView.getName());
697 viewPtr->setParent(inView.getParent());
698 viewPtr->setType(inView.getType());
700 std::map<std::string, PropertySharedPtr> outProperties;
701 std::vector<PropertySharedPtr> properties;
702 inView.getProperties(outProperties);
703 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
704 it != outProperties.end(); ++it) {
706 properties.push_back(clonedProperty);
708 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
709 it != properties.end(); ++it) {
710 viewPtr->setProperty((*it)->getName(), *it);
713 viewPtr->setOriginalName(inView.getOriginalName());
719 std::map<std::string, ParameterSharedPtr> params;
720 oldParams->getAllParameters(oldCtx, params);
721 for(std::map<std::string, ParameterSharedPtr>::iterator it = params.begin();
722 it != params.end(); ++it) {
724 newParams->set(newCtx, (*it).first, clonedParam);
727 std::vector<InstanceSharedPtr> outInstances;
728 inView.getInstances(outInstances);
729 std::vector<InstanceSharedPtr>::iterator instIt = outInstances.begin();
730 for(; instIt != outInstances.end(); ++instIt) {
732 viewPtr->addInstance(newInst);
735 std::vector<PortSharedPtr> outPorts;
736 inView.getPorts(outPorts);
737 std::vector<PortSharedPtr>::iterator portIt = outPorts.begin();
738 for(; portIt != outPorts.end(); ++portIt) {
740 viewPtr->addPort(newPort);
743 std::vector<PermutableSharedPtr> outPermutables;
744 inView.getPermutables(outPermutables);
745 for(std::vector<PermutableSharedPtr>::iterator it = outPermutables.begin();
746 it != outPermutables.end(); ++it) {
748 viewPtr->addPermutable(clonedPermutable);
751 std::vector<InterfaceJoinedInfoSharedPtr> outJoinedInfos;
752 inView.getInterfaceJoinedInfos(outJoinedInfos);
753 for(std::vector<InterfaceJoinedInfoSharedPtr>::iterator it = outJoinedInfos.begin();
754 it != outJoinedInfos.end(); ++it) {
757 viewPtr->addInterfaceJoinedInfo(clonedJoinedInfo);
760 std::vector<NetSharedPtr> outNets;
761 inView.getNets(outNets);
762 std::vector<NetSharedPtr>::iterator netIt = outNets.begin();
763 for(; netIt != outNets.end(); ++netIt) {
765 viewPtr->addNet(netPtr);
766 connectNets(*netIt, netPtr, viewPtr);
768 if(NULL != inView.getTiming()) {
770 viewPtr->setTiming(clonedTiming);
772 if(NULL != inView.getInterfaceAttributes()) {
775 if(!attrib->getDesignator().empty()) {
776 newAttrib->setDesignator(attrib->getDesignator());
778 if(NULL != attrib->getSimulate()) {
780 newAttrib->setSimulate(clonedSimulate);
782 if(NULL != attrib->getTiming()) {
784 newAttrib->setTiming(clonedTiming);
786 newAttrib->setComments(attrib->getComments());
788 std::list < std::string > userData;
789 attrib->getUserData(userData);
790 newAttrib->setUserData(userData);
792 viewPtr->setInterfaceAttributes(newAttrib);
795 if(NULL != inView.getSimulate()) {
797 viewPtr->setSimulate(clonedSimulate);
810 std::vector<NetSharedPtr> inChildren;
811 std::vector<NetSharedPtr> outChildren;
812 inNet->getChildren(inChildren);
813 outNet->getChildren(outChildren);
814 std::vector<NetSharedPtr>::iterator inIt = inChildren.begin();
815 std::vector<NetSharedPtr>::iterator outIt = outChildren.begin();
816 for(; inIt != inChildren.end(); ++inIt, ++outIt) {
817 connectNets(*inIt, *outIt, inView);
820 cloneConnection(inNet, outNet, inView);
826 std::vector<PortSharedPtr> connectedPorts;
827 inNet->getConnectedPorts(connectedPorts,
true);
828 for(std::vector<PortSharedPtr>::iterator it = connectedPorts.begin();
829 it != connectedPorts.end(); ++it) {
830 std::vector < std::string > nestedNames;
835 nestedNames.push_back(port->getName());
836 port = port->getParentCollection();
843 e.
saveContextData(
"Pointer to the target port does not exist", targetPort);
846 if(nestedNames.size() > 1) {
849 std::vector < size_t > indices;
855 std::vector<PortReferenceSharedPtr> connectedPortRefs;
856 inNet->getConnectedPortRefs(connectedPortRefs,
true);
857 for(std::vector<PortReferenceSharedPtr>::iterator it = connectedPortRefs.begin();
858 it != connectedPortRefs.end(); ++it) {
859 std::vector < std::string > nestedNames;
865 nestedNames.push_back(port->getName());
866 instance = port->getParent();
868 port = port->getParentCollection();
870 std::vector < size_t > indices;
873 instance = instance->getParentCollection();
876 if(!indices.empty()) {
877 targetInst = targetInst->get(indices);
884 e.
saveContextData(
"Pointer to the target port does not exist", targetPort);
887 if(nestedNames.size() > 1) {
890 std::vector < size_t > portIndices;
896 std::vector<PortListSharedPtr> connectedPortLists;
897 inNet->getConnectedPortLists(connectedPortLists);
898 for(std::vector<PortListSharedPtr>::iterator it = connectedPortLists.begin();
899 it != connectedPortLists.end(); ++it) {
904 std::list<PortList::PortListElement> elements;
905 (*it)->getChildren(elements);
906 for(std::list<PortList::PortListElement>::iterator element = elements.begin();
907 element != elements.end(); ++element) {
908 switch((*element).getType()) {
910 std::vector < std::string > nestedNames;
915 nestedNames.push_back(port->getName());
916 port = port->getParentCollection();
918 std::vector<std::string>::reverse_iterator name = nestedNames.rbegin();
921 if(nestedNames.size() > 1) {
925 targetPort = targetPort->get(
928 cloned->addChildPort(targetPort);
932 std::vector < std::string > nestedNames;
938 nestedNames.push_back(port->getName());
939 instance = port->getParent();
941 port = port->getParentCollection();
943 std::vector < size_t > indices;
946 instance = instance->getParentCollection();
949 if(!indices.empty()) {
950 targetInst = targetInst->get(indices);
961 if(nestedNames.size() > 1) {
965 targetPort = targetPort->get(
968 cloned->addChildPortReference(targetPort);
973 cloned->connect(outNet);
997 inFactory->create(scalarPort);
998 scalarPort->setComments(inPort.getComments());
999 scalarPort->setName(inPort.getName());
1000 scalarPort->setDirection(inPort.getDirection());
1001 scalarPort->setOriginalName(inPort.getOriginalName());
1002 scalarPort->setAttributes(inPort.getAttributes());
1003 scalarPort->setIsExtern(inPort.getIsExtern());
1004 scalarPort->setParent(inPort.getParent());
1005 scalarPort->setParentCollection(inPort.getParentCollection());
1007 std::list < std::string > userData;
1008 inPort.getUserData(userData);
1009 scalarPort->setUserData(userData);
1011 std::map<std::string, PropertySharedPtr> outProperties;
1012 std::vector<PropertySharedPtr> properties;
1013 inPort.getProperties(outProperties);
1014 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1015 it != outProperties.end(); ++it) {
1017 properties.push_back(clonedProperty);
1019 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1020 it != properties.end(); ++it) {
1021 scalarPort->setProperty((*it)->getName(), *it);
1024 outPointer = scalarPort;
1039 inSource->accept(*
this);
1068 inFactory->create(portRefPtr);
1069 portRefPtr->setParent(inPortRef.getParent());
1070 portRefPtr->setParentCollection(inPortRef.getParentCollection());
1071 portRefPtr->setParent(inPortRef.getParent());
1072 portRefPtr->bindToMasterPort(inPortRef.getMaster());
1073 outPointer = portRefPtr;
1088 inSource->accept(*
this);
1117 inFactory->create(vectorPortPtr);
1118 vectorPortPtr->setComments(inPort.getComments());
1119 vectorPortPtr->setName(inPort.getName());
1120 vectorPortPtr->setDirection(inPort.getDirection());
1121 vectorPortPtr->setOriginalName(inPort.getOriginalName());
1122 vectorPortPtr->setAttributes(inPort.getAttributes());
1123 vectorPortPtr->setIsExtern(inPort.getIsExtern());
1124 vectorPortPtr->setParent(inPort.getParent());
1125 vectorPortPtr->setParentCollection(inPort.getParentCollection());
1127 std::list < std::string > userData;
1128 inPort.getUserData(userData);
1129 vectorPortPtr->setUserData(userData);
1131 std::map<std::string, PropertySharedPtr> outProperties;
1132 std::vector<PropertySharedPtr> properties;
1133 inPort.getProperties(outProperties);
1134 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1135 it != outProperties.end(); ++it) {
1137 properties.push_back(clonedProperty);
1139 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1140 it != properties.end(); ++it) {
1141 vectorPortPtr->setProperty((*it)->getName(), *it);
1145 std::vector < size_t > outLimits;
1146 inPort.getLimits(outLimits);
1147 vectorPortPtr->constructChildren(inFactory, outLimits);
1149 inPort.getCreatedChildren(children);
1150 for(VectorPort::BaseType::List::iterator it = children.begin(); it != children.end();
1155 clonedChild->setComments(child->getComments());
1156 clonedChild->setName(child->getName());
1157 clonedChild->setDirection(child->getDirection());
1158 clonedChild->setOriginalName(child->getOriginalName());
1159 clonedChild->setAttributes(child->getAttributes());
1160 clonedChild->setIsExtern(child->getIsExtern());
1161 clonedChild->setParent(child->getParent());
1163 std::map < std::string, PropertySharedPtr > outProperties;
1164 std::vector < PropertySharedPtr > properties;
1165 child->getProperties(outProperties);
1166 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1167 it != outProperties.end(); ++it) {
1169 properties.push_back(clonedProperty);
1171 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1172 it != properties.end(); ++it) {
1173 clonedChild->setProperty((*it)->getName(), *it);
1177 outPointer = vectorPortPtr;
1192 inSource->accept(*
this);
1221 inFactory->create(vectorPortRefPtr);
1223 std::vector < size_t > outLimits;
1224 inPortRef.getLimits(outLimits);
1225 vectorPortRefPtr->constructChildren(inFactory, outLimits);
1226 vectorPortRefPtr->setParent(inPortRef.getParent());
1227 vectorPortRefPtr->setParentCollection(inPortRef.getParentCollection());
1228 vectorPortRefPtr->bindToMasterPort(inPortRef.getMaster());
1230 inPortRef.getCreatedChildren(children);
1231 for(VectorPortReference::BaseType::List::iterator it = children.begin();
1232 it != children.end(); ++it) {
1236 clonedChild->setParent(child->getParent());
1240 outPointer = vectorPortRefPtr;
1255 inSource->accept(*
this);
1284 inFactory->create(portBundlePtr);
1285 portBundlePtr->setComments(inPort.getComments());
1286 portBundlePtr->setName(inPort.getName());
1287 portBundlePtr->setIsExtern(inPort.getIsExtern());
1288 portBundlePtr->setParent(inPort.getParent());
1289 portBundlePtr->setParentCollection(inPort.getParentCollection());
1291 std::list < std::string > userData;
1292 inPort.getUserData(userData);
1293 portBundlePtr->setUserData(userData);
1295 std::map<std::string, PropertySharedPtr> outProperties;
1296 std::vector<PropertySharedPtr> properties;
1297 inPort.getProperties(outProperties);
1298 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1299 it != outProperties.end(); ++it) {
1301 properties.push_back(clonedProperty);
1303 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1304 it != properties.end(); ++it) {
1305 portBundlePtr->setProperty((*it)->getName(), *it);
1308 portBundlePtr->setDirection(inPort.getDirection());
1309 portBundlePtr->setAttributes(inPort.getAttributes());
1310 portBundlePtr->setOriginalName(inPort.getOriginalName());
1311 std::vector<PortSharedPtr> children;
1312 inPort.getChildren(children);
1313 for(std::vector<PortSharedPtr>::iterator it = children.begin(); it != children.end();
1316 portBundlePtr->addChild(clonedPort);
1319 outPointer = portBundlePtr;
1334 inSource->accept(*
this);
1363 inFactory->create(portBundleRefPtr);
1364 portBundleRefPtr->setParent(inPortRef.getParent());
1365 portBundleRefPtr->setParentCollection(inPortRef.getParentCollection());
1366 std::vector<PortReferenceSharedPtr> children;
1367 inPortRef.getChildren(children);
1368 for(std::vector<PortReferenceSharedPtr>::iterator it = children.begin();
1369 it != children.end(); ++it) {
1371 portBundleRefPtr->addChild(clonedPortRef);
1373 portBundleRefPtr->bindToMasterPort(inPortRef.getMaster());
1376 outPointer = portBundleRefPtr;
1391 inSource->accept(*
this);
1420 inFactory->create(instPtr);
1421 instPtr->setComments(inInstance.getComments());
1422 instPtr->setName(inInstance.getName());
1423 instPtr->setOriginalName(inInstance.getOriginalName());
1424 instPtr->setParent(inInstance.getParent());
1426 std::vector<PortReferenceSharedPtr> outPortRefs;
1427 inInstance.getPortReferences(outPortRefs);
1428 for(std::vector<PortReferenceSharedPtr>::iterator it = outPortRefs.begin();
1429 it != outPortRefs.end(); ++it) {
1431 instPtr->addPortReference(clonedRef);
1433 instPtr->bindToMasterView(inInstance.getMaster());
1437 std::list < std::string > userData;
1438 inInstance.getUserData(userData);
1439 instPtr->setUserData(userData);
1441 std::map<std::string, PropertySharedPtr> outProperties;
1442 std::vector<PropertySharedPtr> properties;
1443 inInstance.getProperties(outProperties);
1444 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1445 it != outProperties.end(); ++it) {
1447 properties.push_back(clonedProperty);
1449 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1450 it != properties.end(); ++it) {
1451 instPtr->setProperty((*it)->getName(), *it);
1454 if(NULL != inInstance.getTiming()) {
1456 instPtr->setTiming(clonedTiming);
1459 outPointer = instPtr;
1475 inSource->accept(*
this);
1504 inFactory->create(netPtr);
1505 netPtr->setComments(inNet.getComments());
1506 netPtr->setName(inNet.getName());
1507 netPtr->setParent(inNet.getParent());
1508 netPtr->setOriginalName(inNet.getOriginalName());
1510 std::list < std::string > userData;
1511 inNet.getUserData(userData);
1512 netPtr->setUserData(userData);
1514 std::map<std::string, PropertySharedPtr> outProperties;
1515 std::vector<PropertySharedPtr> properties;
1516 inNet.getProperties(outProperties);
1517 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1518 it != outProperties.end(); ++it) {
1520 properties.push_back(clonedProperty);
1522 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1523 it != properties.end(); ++it) {
1524 netPtr->setProperty((*it)->getName(), *it);
1527 std::vector<NetSharedPtr> outNets;
1528 inNet.getSubnets(outNets);
1529 std::vector<NetSharedPtr>::iterator netIt = outNets.begin();
1530 for(; netIt != outNets.end(); ++netIt) {
1532 netPtr->addSubnet(childNet);
1535 outPointer = netPtr;
1550 inSource->accept(*
this);
1579 inFactory->create(netBundlePtr);
1580 netBundlePtr->setComments(inNet.getComments());
1581 netBundlePtr->setName(inNet.getName());
1582 netBundlePtr->setParent(inNet.getParent());
1583 netBundlePtr->setOriginalName(inNet.getOriginalName());
1585 std::list < std::string > userData;
1586 inNet.getUserData(userData);
1587 netBundlePtr->setUserData(userData);
1589 std::map<std::string, PropertySharedPtr> outProperties;
1590 std::vector<PropertySharedPtr> properties;
1591 inNet.getProperties(outProperties);
1592 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1593 it != outProperties.end(); ++it) {
1595 properties.push_back(clonedProperty);
1597 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1598 it != properties.end(); ++it) {
1599 netBundlePtr->setProperty((*it)->getName(), *it);
1602 std::vector<NetSharedPtr> outChildren;
1603 inNet.getChildren(outChildren);
1604 std::vector<NetSharedPtr>::iterator it = outChildren.begin();
1605 for(; it != outChildren.end(); ++it) {
1607 netBundlePtr->addChild(clonedChild);
1609 std::vector<NetSharedPtr> outNets;
1610 inNet.getSubnets(outNets);
1611 std::vector<NetSharedPtr>::iterator netIt = outNets.begin();
1612 for(; netIt != outNets.end(); ++netIt) {
1614 netBundlePtr->addSubnet(childNet);
1616 outPointer = netBundlePtr;
1631 inSource->accept(*
this);
1660 inFactory->create(vectorNetPtr);
1661 vectorNetPtr->setComments(inNet.getComments());
1662 vectorNetPtr->setName(inNet.getName());
1663 vectorNetPtr->setParent(inNet.getParent());
1664 vectorNetPtr->setOriginalName(inNet.getOriginalName());
1666 std::list < std::string > userData;
1667 inNet.getUserData(userData);
1668 vectorNetPtr->setUserData(userData);
1670 std::map<std::string, PropertySharedPtr> outProperties;
1671 std::vector<PropertySharedPtr> properties;
1672 inNet.getProperties(outProperties);
1673 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1674 it != outProperties.end(); ++it) {
1676 properties.push_back(clonedProperty);
1678 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1679 it != properties.end(); ++it) {
1680 vectorNetPtr->setProperty((*it)->getName(), *it);
1684 std::vector < size_t > outLimits;
1685 inNet.getLimits(outLimits);
1686 vectorNetPtr->constructChildren(inFactory, outLimits);
1688 inNet.getCreatedChildren(children);
1689 for(VectorNet::BaseType::List::iterator it = children.begin(); it != children.end(); ++it) {
1692 clonedChild->setComments(child->getComments());
1693 clonedChild->setName(child->getName());
1694 clonedChild->setParent(child->getParent());
1695 clonedChild->setOriginalName(child->getOriginalName());
1697 std::map < std::string, PropertySharedPtr > outProperties;
1698 std::vector < PropertySharedPtr > properties;
1699 child->getProperties(outProperties);
1700 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1701 it != outProperties.end(); ++it) {
1703 properties.push_back(clonedProperty);
1705 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1706 it != properties.end(); ++it) {
1707 clonedChild->setProperty((*it)->getName(), *it);
1710 std::vector<NetSharedPtr> outNets;
1711 child->getSubnets(outNets);
1712 std::vector<NetSharedPtr>::iterator netIt = outNets.begin();
1713 for(; netIt != outNets.end(); ++netIt) {
1715 clonedChild->addSubnet(clonedChildNet);
1719 std::vector<NetSharedPtr> outNets;
1720 inNet.getSubnets(outNets);
1721 std::vector<NetSharedPtr>::iterator netIt = outNets.begin();
1722 for(; netIt != outNets.end(); ++netIt) {
1724 vectorNetPtr->addSubnet(childNet);
1727 outPointer = vectorNetPtr;
1742 inSource->accept(*
this);
1771 inFactory->create(instArrayPtr);
1772 instArrayPtr->setComments(inInstanceArray.getComments());
1773 instArrayPtr->setName(inInstanceArray.getName());
1774 instArrayPtr->setParent(inInstanceArray.getParent());
1775 instArrayPtr->setOriginalName(inInstanceArray.getOriginalName());
1777 std::list < std::string > userData;
1778 inInstanceArray.getUserData(userData);
1779 instArrayPtr->setUserData(userData);
1781 std::map<std::string, PropertySharedPtr> outProperties;
1782 std::vector<PropertySharedPtr> properties;
1783 inInstanceArray.getProperties(outProperties);
1784 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1785 it != outProperties.end(); ++it) {
1787 properties.push_back(clonedProperty);
1789 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1790 it != properties.end(); ++it) {
1791 instArrayPtr->setProperty((*it)->getName(), *it);
1797 instArrayPtr->bindToMasterView(inInstanceArray.getMaster());
1798 copyParams(inInstanceArray, instArrayPtr, inFactory);
1801 std::vector < size_t > outLimits;
1802 inInstanceArray.getLimits(outLimits);
1803 instArrayPtr->constructChildren(inFactory, outLimits);
1805 inInstanceArray.getChildren(children);
1806 for(InstanceArray::BaseVectorType::List::iterator it = children.begin();
1807 it != children.end(); ++it) {
1811 cloned->setComments(orig->getComments());
1812 cloned->setName(orig->getName());
1813 cloned->setOriginalName(orig->getOriginalName());
1814 cloned->setParent(orig->getParent());
1816 std::list < std::string > userData;
1817 orig->getUserData(userData);
1818 cloned->setUserData(userData);
1820 std::map < std::string, PropertySharedPtr > outProperties;
1821 std::vector < PropertySharedPtr > properties;
1822 orig->getProperties(outProperties);
1823 for(std::map<std::string, PropertySharedPtr>::iterator it = outProperties.begin();
1824 it != outProperties.end(); ++it) {
1826 properties.push_back(clonedProperty);
1828 for(std::vector<PropertySharedPtr>::iterator it = properties.begin();
1829 it != properties.end(); ++it) {
1830 cloned->setProperty((*it)->getName(), *it);
1833 std::vector<PortReferenceSharedPtr> outPortRefs;
1834 orig->getPortReferences(outPortRefs);
1835 for(std::vector<PortReferenceSharedPtr>::iterator pit = outPortRefs.begin();
1836 pit != outPortRefs.end(); ++pit) {
1838 cloned->addPortReference(clonedRef);
1840 cloned->bindToMasterView(orig->getMaster());
1843 outPointer = instArrayPtr;
1858 inSource->accept(*
this);
1887 inFactory->create(singleParameterPtr);
1888 singleParameterPtr->setName(inSingleParameter.getName());
1889 singleParameterPtr->setUnit(inSingleParameter.getUnit());
1890 singleParameterPtr->setValue(inSingleParameter.getValue());
1891 singleParameterPtr->setOriginalName(inSingleParameter.getOriginalName());
1892 outPointer = singleParameterPtr;
1907 inSource->accept(*
this);
1936 inFactory->create(paramArrayPtr);
1937 paramArrayPtr->setName(inParamArray.getName());
1938 paramArrayPtr->setOriginalName(inParamArray.getOriginalName());
1940 std::vector < size_t > outLimits;
1941 inParamArray.getLimits(outLimits);
1942 paramArrayPtr->constructChildren(inFactory, outLimits);
1944 inParamArray.getChildren(children);
1945 ParameterArray::BaseVectorType::List::iterator it = children.begin();
1946 for(; it != children.end(); ++it) {
1950 cloned->setName(orig->getName());
1951 cloned->setUnit(orig->getUnit());
1952 cloned->setValue(orig->getValue());
1954 outPointer = paramArrayPtr;
1969 inSource->accept(*
this);
2002 inSource->accept(*
this);
2010 propertyPtr->setComments(inProperty.getComments());
2011 propertyPtr->setName(inProperty.getName());
2012 propertyPtr->setOriginalName(inProperty.getOriginalName());
2013 propertyPtr->setOwner(inProperty.getOwner());
2014 propertyPtr->setUnit(inProperty.getUnit());
2015 propertyPtr->setValue(inProperty.getValue());
2017 std::map<std::string, PropertySharedPtr> outValues;
2018 inProperty.getChildren(outValues);
2019 for(std::map<std::string, PropertySharedPtr>::iterator it = outValues.begin();
2020 it != outValues.end(); ++it) {
2022 propertyPtr->addChildProperty((*it).first, childProperty);
2051 inSource->accept(*
this);
2103 inSource->accept(*
this);
2155 inSource->accept(*
this);
2208 inSource->accept(*
this);
2251 inSource->accept(*
this);
2294 inSource->accept(*
this);
2302 permutablePtr->setPermutableType(inPermutable.getPermutableType());
2303 permutablePtr->setIsNonPermutable(inPermutable.getIsNonPermutable());
2305 std::vector<PortSharedPtr> outPorts;
2306 inPermutable.getPorts(outPorts);
2307 std::vector<PortSharedPtr>::iterator portIt = outPorts.begin();
2308 for(; portIt != outPorts.end(); ++portIt) {
2311 std::vector < std::string > nestedNames;
2314 nestedNames.push_back(port->getName());
2315 port = port->getParentCollection();
2319 if(nestedNames.size() > 1) {
2322 std::vector < size_t > indices;
2327 if(!indices.empty()) {
2328 targetPort = targetPort->get(indices);
2330 permutablePtr->addPort(targetPort);
2333 std::vector<PermutableSharedPtr> outPermutables;
2334 inPermutable.getChildren(outPermutables);
2335 for(std::vector<PermutableSharedPtr>::iterator it = outPermutables.begin();
2336 it != outPermutables.end(); ++it) {
2338 permutablePtr->addChildPermutable(childPermutable);
2371 inSource->accept(*
this);
2379 joinedInfoPtr->setJoinedType(inInterfaceJoinedInfo.getJoinedType());
2381 std::list<PortSharedPtr> outPorts;
2382 inInterfaceJoinedInfo.getPorts(outPorts);
2383 std::list<PortSharedPtr>::iterator portIt = outPorts.begin();
2384 for(; portIt != outPorts.end(); ++portIt) {
2387 std::vector < std::string > nestedNames;
2390 nestedNames.push_back(port->getName());
2391 port = port->getParentCollection();
2395 if(nestedNames.size() > 1) {
2398 std::vector < size_t > indices;
2403 if(!indices.empty()) {
2404 targetPort = targetPort->get(indices);
2407 joinedInfoPtr->addPort(targetPort);
2410 std::list<PortListSharedPtr> outPortLists;
2411 inInterfaceJoinedInfo.getPortLists(outPortLists);
2412 std::list<PortListSharedPtr>::iterator portListIt = outPortLists.begin();
2413 for(; portListIt != outPortLists.end(); ++portListIt) {
2415 joinedInfoPtr->addPortList(newPortList);
2418 std::vector<InterfaceJoinedInfoSharedPtr> outJoinedInfos;
2419 inInterfaceJoinedInfo.getChildren(outJoinedInfos);
2420 for(std::vector<InterfaceJoinedInfoSharedPtr>::iterator it = outJoinedInfos.begin();
2421 it != outJoinedInfos.end(); ++it) {
2424 joinedInfoPtr->addChildJoinedInfo(childJoinedInfo);
2455 inSource->accept(*
this);
2463 std::list<PortList::PortListElement> elements;
2464 inPortList.getChildren(elements);
2465 for(std::list<PortList::PortListElement>::iterator it = elements.begin();
2466 it != elements.end(); ++it) {
2467 switch((*it).getType()) {
2469 portList->addChildPort((*it).getPort());
2473 portList->addChildPortReference((*it).getPortReference());
2506 inSource->accept(*
this);
2514 simulatePtr->setComments(inSimulate.getComments());
2516 std::list < std::string > userData;
2517 inSimulate.getUserData(userData);
2518 simulatePtr->setUserData(userData);
2520 simulatePtr->setName(inSimulate.getName());
2521 simulatePtr->setOriginalName(inSimulate.getOriginalName());
2523 std::vector<PortListAliasSharedPtr> outPortListAliases;
2524 inSimulate.getPortListAliases(outPortListAliases);
2525 for(std::vector<PortListAliasSharedPtr>::iterator it = outPortListAliases.begin();
2526 it != outPortListAliases.end(); ++it) {
2528 mFactory->create(newPortListAlias);
2529 newPortListAlias->setName((*it)->getName());
2531 newPortListAlias->setPortList(clonedPortList);
2532 simulatePtr->addPortListAlias(newPortListAlias);
2535 std::vector<WaveValueSharedPtr> outWaveValues;
2536 inSimulate.getWaveValues(outWaveValues);
2537 for(std::vector<WaveValueSharedPtr>::iterator it = outWaveValues.begin();
2538 it != outWaveValues.end(); ++it) {
2541 newWaveValue->setName((*it)->getName());
2542 newWaveValue->setDeltaTimeDuration((*it)->getDeltaTimeDuration());
2543 if(NULL != (*it)->getLogicWaveform()) {
2546 newWaveValue->setLogicWaveform(clonedLogicElem);
2548 simulatePtr->addWaveValue(newWaveValue);
2551 std::vector<ApplySharedPtr> outAllApply;
2552 inSimulate.getAllApply(outAllApply);
2553 for(std::vector<ApplySharedPtr>::iterator it = outAllApply.begin();
2554 it != outAllApply.end(); ++it) {
2557 newApply->setComments((*it)->getComments());
2559 std::list < std::string > userData;
2560 (*it)->getUserData(userData);
2561 newApply->setUserData(userData);
2563 newApply->setNoOfCycle((*it)->getNoOfCycle());
2564 newApply->setCycleDuration((*it)->getCycleDuration());
2566 std::list<LogicalResponseSharedPtr> outLogicResponces;
2567 (*it)->getLogicResponses(outLogicResponces);
2568 for(std::list<LogicalResponseSharedPtr>::iterator it = outLogicResponces.begin();
2569 it != outLogicResponces.end(); ++it) {
2571 newApply->addLogicResponse(clonedLogicalResponse);
2573 simulatePtr->addApply(newApply);
2603 inSource->accept(*
this);
2610 mFactory->create(logicalResponsePtr);
2611 logicalResponsePtr->setResponseType(inLogicalResponse.getResponseType());
2612 if(NULL != inLogicalResponse.getConnectedPort()) {
2615 logicalResponsePtr->setConnectedPort(clonedPort);
2617 if(NULL != inLogicalResponse.getConnectedPortListAlias()) {
2619 mFactory->create(newPortListAlias);
2620 newPortListAlias->setName(inLogicalResponse.getConnectedPortListAlias()->getName());
2622 inLogicalResponse.getConnectedPortListAlias()->getPortList(),
mFactory);
2623 newPortListAlias->setPortList(clonedPortList);
2624 logicalResponsePtr->setConnectedPortListAlias(newPortListAlias);
2626 if(NULL != inLogicalResponse.getConnectedPortList()) {
2629 logicalResponsePtr->setConnectedPortList(clonedPortList);
2634 logicalResponsePtr->setLogicWaveForm(clonedLogicElem);
2663 inSource->accept(*
this);
2671 timingPtr->setComments(inTiming.getComments());
2673 std::list < std::string > userData;
2674 inTiming.getUserData(userData);
2675 timingPtr->setUserData(userData);
2677 timingPtr->setDerivation(inTiming.getDerivation());
2678 std::list<PathDelaySharedPtr> outPathDelays;
2679 inTiming.getPathDelays(outPathDelays);
2680 std::list<PathDelaySharedPtr>::iterator pathDelayIt = outPathDelays.begin();
2681 for(; pathDelayIt != outPathDelays.end(); pathDelayIt++) {
2685 newPathDelay->setDelay(pathDelay->getDelay());
2687 std::list<EventSharedPtr> outEvents;
2688 pathDelay->getEvents(outEvents);
2689 std::list<EventSharedPtr>::iterator eventIt = outEvents.begin();
2690 for(; eventIt != outEvents.end(); eventIt++) {
2692 newPathDelay->addEvent(clonedEvent);
2695 timingPtr->addPathDelay(newPathDelay);
2698 std::list<ForbiddenEventSharedPtr> outForbiddentEvents;
2699 inTiming.getForbiddentEvents(outForbiddentEvents);
2700 std::list<ForbiddenEventSharedPtr>::iterator forbiddentEventIt =
2701 outForbiddentEvents.begin();
2702 for(; forbiddentEventIt != outForbiddentEvents.end(); forbiddentEventIt++) {
2704 timingPtr->addForbiddenEvent(clonedForbiddenEvent);
2734 inSource->accept(*
this);
2741 mFactory->create(forbiddenEventPtr);
2742 if(NULL != inForbiddenEvent.getStartTimeInterval()) {
2745 forbiddenEventPtr->setStartTimeInterval(clonedEvent);
2747 if(NULL != inForbiddenEvent.getEndTimeInterval()) {
2749 forbiddenEventPtr->setEndTimeInterval(clonedEvent);
2751 forbiddenEventPtr->setDuration(inForbiddenEvent.getDuration());
2753 std::list<EventSharedPtr> outEvents;
2754 inForbiddenEvent.getEvents(outEvents);
2755 std::list<EventSharedPtr>::iterator eventIt = outEvents.begin();
2756 for(; eventIt != outEvents.end(); eventIt++) {
2758 forbiddenEventPtr->addEvent(clonedEvent);
2788 inSource->accept(*
this);
2796 eventPtr->setType(inEvent.getType());
2798 eventPtr->setOffsetTime(inEvent.getOffsetTime());
2801 std::list<PortElement> outPortElements;
2802 inEvent.getPortElements(outPortElements);
2803 std::list<PortElement>::iterator portElem = outPortElements.begin();
2804 std::list<PortElement>::iterator end = outPortElements.end();
2805 for(; portElem != end; ++portElem) {
2806 switch((*portElem).getType()) {
2809 eventPtr->addPort(newPort);
2815 eventPtr->addPortReference(clonedRef);
2821 if(NULL != inEvent.getPortList()) {
2823 eventPtr->setPortList(clonedPortList);
2826 std::list<NetSharedPtr> outNets;
2827 inEvent.getNets(outNets);
2828 std::list<NetSharedPtr>::iterator netIt = outNets.begin();
2830 for(; netIt != outNets.end(); ++netIt) {
2832 eventPtr->addNet(netPtr);
2835 if(NULL != inEvent.getTransition()) {
2837 eventPtr->setTransition(clonedLogicElem);
2867 inSource->accept(*
this);
2875 logicElementPtr->setType(inLogicElement.getType());
2877 logicElementPtr->setName(inLogicElement.getName());
2879 std::vector<LogicElementSharedPtr> outLogicElements;
2880 inLogicElement.getChildren(outLogicElements);
2881 for(std::vector<LogicElementSharedPtr>::iterator it = outLogicElements.begin();
2882 it != outLogicElements.end(); ++it) {
2884 logicElementPtr->addChildLogicElement(clonedLogicElement);
2909 #endif // TORC_GENERIC_CLONING_HPP
boost::shared_ptr< LogicValue > LogicValueSharedPtr
ObjectFactorySharedPtr mFactory
An acyclic inoutVisitor implementation.
ObjectFactorySharedPtr mFactory
void visit(VectorPort &inPort)
boost::shared_ptr< Instance > InstanceSharedPtr
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
void visit(PortBundleReference &inPort)
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Represents areference to a standalone port.
void connectNets(const NetSharedPtr &inNet, const NetSharedPtr &outNet, const ViewSharedPtr &inView)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(InterfaceJoinedInfo &inInterfaceJoinedInfo)
void visit(LogicValue &inLogicValue)
Represents a reference to a port array.
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
void visit(PortList &inPortList)
boost::shared_ptr< Type > Pointer
boost::shared_ptr< Type > Pointer
Represents an instantiation of a cell view in the view of another cell.
void findLeafConnectable(std::vector< std::string > &nestedNames, boost::shared_ptr< _Connectable > &conn)
boost::shared_ptr< Type > Pointer
Represents a bundle of ports.
void visit(SimulationInfo &inSimulationInfo)
LogicMapType mLogicMapType
boost::shared_ptr< ParameterArray > ParameterArraySharedPtr
ObjectFactorySharedPtr mFactory
Represents the usable instance of a port of a cell in another cell.
boost::shared_ptr< ScalarPort > ScalarPortSharedPtr
void visit(PortBundleReference &inPortReference)
boost::shared_ptr< WaveValue > WaveValueSharedPtr
boost::shared_ptr< Type > Pointer
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
Represents and EDIF View.
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< ScalarNet > ScalarNetSharedPtr
void visit(ParameterArray &inParameter)
boost::shared_ptr< LogicElement > LogicElementSharedPtr
boost::shared_ptr< Type > Pointer
boost::shared_ptr< PortBundle > PortBundleSharedPtr
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void connectNetToElement(const std::vector< size_t > &inIndices, const boost::shared_ptr< _Connectable > &inConn, const NetSharedPtr &inNet)
ObjectFactorySharedPtr mFactory
void visit(VectorPortReference &inPortReference)
boost::shared_ptr< Permutable > PermutableSharedPtr
This structure is for logicRef and libraryRef used in logicMapInput/logicMapOutput.
Permutable is used to describe a relationship in which ports are interchangeable. ...
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(Event &inEvent)
boost::shared_ptr< Type > Pointer
boost::shared_ptr< Type > Pointer
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(ScalarPort &inPort)
ObjectFactorySharedPtr mFactory
boost::shared_ptr< Parameter > ParameterSharedPtr
ObjectFactorySharedPtr mFactory
Represents a single instance of the view of a cell.
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(NetBundle &inPort)
This class is used to hold all information about the logic values used within a library.
boost::shared_ptr< _Tp > clonePermutable(const boost::shared_ptr< _Tp > &inPointer, const ObjectFactorySharedPtr &inFactory, const ViewSharedPtr &inView)
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Written > WrittenSharedPtr
boost::shared_ptr< ObjectFactory > ObjectFactorySharedPtr
boost::shared_ptr< InstanceArray > InstanceArraySharedPtr
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
boost::shared_ptr< Type > Pointer
boost::shared_ptr< ScalarPortReference > ScalarPortReferenceSharedPtr
This class is used within simulationInfo construct to define a logic value to use for modeling in the...
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(VectorPort &inPort)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
boost::shared_ptr< Simulate > SimulateSharedPtr
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(Design &inDesign)
boost::shared_ptr< Design > DesignSharedPtr
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
void visit(VectorNet &inNet)
void visit(ScalarPortReference &inPortReference)
boost::shared_ptr< VectorPort > VectorPortSharedPtr
boost::shared_ptr< Type > Pointer
boost::shared_ptr< VectorNet > VectorNetSharedPtr
boost::shared_ptr< Type > Pointer
boost::shared_ptr< _Tp > clone(const boost::shared_ptr< _Tp > &inPointer, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Type > Pointer
Represents a parameter object in EDIF.
boost::shared_ptr< Type > Pointer
The Error object thrown by different methods of EdifOM.
boost::shared_ptr< LogicalResponse > LogicalResponseSharedPtr
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Net > NetSharedPtr
ObjectFactorySharedPtr mFactory
Represents a parameter array.
void visit(InstanceArray &inInstance)
boost::shared_ptr< Library > LibrarySharedPtr
ObjectFactorySharedPtr mFactory
boost::shared_ptr< PortReference > PortReferenceSharedPtr
boost::shared_ptr< SimulationInfo > SimulationInfoSharedPtr
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(SingleParameter &inParameter)
Represents a standalone port.
ObjectFactorySharedPtr mFactory
Represents the Interface joining information.
This class is used to provide a set of path delays or timing constrains (forbidden events) ...
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
ObjectFactorySharedPtr mFactory
void visit(ScalarPort &inPort)
ObjectFactorySharedPtr mFactory
Represents an array of instances.
boost::shared_ptr< ForbiddenEvent > ForbiddenEventSharedPtr
Represents a standalone net.
boost::shared_ptr< PortList > PortListSharedPtr
void visit(VectorPortReference &inPort)
boost::shared_ptr< Apply > ApplySharedPtr
void visit(PortBundle &inPort)
void saveContextData(const std::string &inName, const boost::any &inSource)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void visit(InstanceArray &inPort)
ObjectFactorySharedPtr mFactory
ForbiddenEvent class lists events which are forbidden during a period of times which is specified by ...
Represents attributes of a view interface.
boost::shared_ptr< Event > EventSharedPtr
ObjectFactorySharedPtr mFactory
void visit(ScalarNet &inPort)
void visit(LogicElement &inLogicElement)
ObjectFactorySharedPtr mFactory
ObjectFactorySharedPtr mFactory
void visit(ForbiddenEvent &inForbiddenEvent)
boost::shared_ptr< _Tp > cloneJoinedInfo(const boost::shared_ptr< _Tp > &inPointer, const ObjectFactorySharedPtr &inFactory, const ViewSharedPtr &inView)
boost::shared_ptr< Type > Pointer
boost::shared_ptr< SingleParameter > SingleParameterSharedPtr
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Type > Pointer
Represents different logic elements which holds array of logic values.
This class is used within simulationInfo construct to define a logic value to use for modeling...
void visit(Library &inLibrary)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory, const ViewSharedPtr &inView)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
void visit(LogicalResponse &inLogicalResponse)
void visit(Simulate &inSimulate)
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
boost::shared_ptr< InterfaceAttributes > InterfaceAttributesSharedPtr
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Represents an ordered list of port references.
void visit(Status &inStatus)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory, const ViewSharedPtr &inView)
ObjectFactorySharedPtr mFactory
Root of the EDIF Object Model.
This class is used to model logicInput/logicOutput construct. This class holds information of logical...
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Represents a bundle of nets.
void visit(Property &inProperty)
Interface for an EDIF port object.
boost::shared_ptr< View > ViewSharedPtr
boost::shared_ptr< Cell > CellSharedPtr
void visit(ScalarPortReference &inPort)
Event is used to describe an event on a port or a net using logic state transitions. Events can also be described for unordered groups of ports or nets using portGroup or netGroup. An ordered list of ports may also be used using a portList.
boost::shared_ptr< InterfaceJoinedInfo > InterfaceJoinedInfoSharedPtr
void copyParams(const Instance &inOriginal, const InstanceSharedPtr &outCloned, const ObjectFactorySharedPtr &inFactory)
void visit(Timing &inTiming)
boost::shared_ptr< Type > Pointer
void visit(NetBundle &inNet)
boost::shared_ptr< Type > Pointer
boost::shared_ptr< PortListAlias > PortListAliasSharedPtr
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Type > Pointer
boost::shared_ptr< Port > PortSharedPtr
boost::shared_ptr< PathDelay > PathDelaySharedPtr
void visit(PortBundle &inPort)
boost::shared_ptr< Property > PropertySharedPtr
void visit(SingleParameter &inPort)
boost::shared_ptr< SingleInstance > SingleInstanceSharedPtr
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< LogicValueAttributes > LogicValueAttributesSharedPtr
void visit(VectorNet &inPort)
boost::shared_ptr< Type > Pointer
void visit(SingleInstance &inPort)
void copyObject(ScalarPort &inPort, ObjectFactorySharedPtr &inFactory, _PointerType &outPointer)
ObjectFactorySharedPtr mFactory
boost::shared_ptr< Type > Pointer
boost::shared_ptr< Timing > TimingSharedPtr
ObjectFactorySharedPtr mFactory
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
ObjectFactorySharedPtr mFactory
boost::shared_ptr< Status > StatusSharedPtr
boost::shared_ptr< VectorPortReference > VectorPortReferenceSharedPtr
boost::shared_ptr< NetBundle > NetBundleSharedPtr
This class is to model simulate construct which is a named collection of simulation stimulus and resp...
Represents EDIF status construct.
boost::shared_ptr< Type > Pointer
void visit(ScalarNet &inNet)
Represents a reference to a bundle of ports.
boost::shared_ptr< Type > Pointer
ObjectFactorySharedPtr mFactory
void visit(ParameterArray &inPort)
void visit(Permutable &inPermutable)
boost::shared_ptr< Root > RootSharedPtr
void cloneConnection(const NetSharedPtr &inNet, const NetSharedPtr &outNet, const ViewSharedPtr &inView)
boost::shared_ptr< ParameterMap > ParameterMapSharedPtr
boost::shared_ptr< Type > Pointer
void visit(SingleInstance &inInstance)
boost::shared_ptr< PortBundleReference > PortBundleReferenceSharedPtr
boost::shared_ptr< Type > Pointer
Pointer operator()(const Pointer &inSource, const ObjectFactorySharedPtr &inFactory)
void setCurrentLocation(const std::string &inFunction, const std::string &inFile, uint32_t inLine)
std::vector< Pointer > List