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);
1804 InstanceArray::BaseVectorType::List children;
1805 inInstanceArray.getChildren(children);
1806 for(InstanceArray::BaseVectorType::List::iterator it = children.begin();
1807 it != children.end(); ++it) {
1810 IndexFinder<Instance, InstanceArrayMember>()(orig));
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;
1845 e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
boost::shared_ptr< Instance > InstanceSharedPtr
boost::shared_ptr< InstanceArray > InstanceArraySharedPtr
boost::shared_ptr< _Tp > clone(const boost::shared_ptr< _Tp > &inPointer, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< PortReference > PortReferenceSharedPtr
void copyParams(const Instance &inOriginal, const InstanceSharedPtr &outCloned, const ObjectFactorySharedPtr &inFactory)
boost::shared_ptr< Property > PropertySharedPtr