48 const std::string & type,
62 objectMap::iterator it =
mObjects.begin();
63 objectMap::iterator end =
mObjects.end();
65 for (; it != end; it++)
66 if (it->second != NULL &&
67 it->second->getObjectParent() ==
this)
69 it->second->setObjectParent(NULL);
84 if (cn ==
"Property=DisplayName")
96 std::pair< objectMap::const_iterator, objectMap::const_iterator > range =
99 objectMap::const_iterator it = range.first;
101 while (it != range.second && it->second->getObjectType() != Type) ++it;
103 if (it == range.second)
105 if (Type ==
"String")
107 else if (Type ==
"Separator")
115 if (it->second->isNameVector() || it->second->isVector())
122 if (it->second->getObjectType() ==
"Reference" ||
133 if (it->second->isArray())
150 indices +=
"[" + tmp +
"]";
155 pObject = it->second->
getObject(indices);
172 if (it->second->isContainer())
175 if (it->second->isMatrix())
183 if (it->second->getObjectType() ==
"Reference" || !pObject)
199 if (ptr == NULL)
return NULL;
201 objectMap::const_iterator it =
mObjects.begin();
202 objectMap::const_iterator end =
mObjects.end();
204 for (; it != end; ++it)
205 if (ptr == it->second->getValuePointer())
return it->second;
216 std::pair< objectMap::iterator, objectMap::iterator > range =
218 objectMap::iterator it;
220 for (it = range.first; it != range.second; ++it)
221 if (it->second == pObject)
break;
223 if (it != range.second)
return false;
227 (std::pair<const std::string, CCopasiObject * >(pObject->
getObjectName(),
237 objectMap::iterator it =
mObjects.begin();
238 objectMap::iterator end =
mObjects.end();
245 for (; it != end; ++it)
246 if (it->second == pObject)
break;
248 if (it == end)
return false;
virtual bool setObjectParent(const CCopasiContainer *pParent)
const std::string & getObjectName() const
CCopasiObjectName getRemainder() const
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
virtual const objectMap & getObjects() const
const std::string & getObjectType() const
std::string getObjectType() const
std::multimap< std::string, CCopasiObject * > objectMap
virtual std::string getChildObjectUnits(const CCopasiObject *pObject) const
static const std::vector< CCopasiContainer * > EmptyList
virtual const CCopasiObject * getValueObject() const
std::string getElementName(const size_t &pos, const bool &unescape=true) const
virtual bool remove(CCopasiObject *pObject)
virtual ~CCopasiContainer()
Header file of class CCopasiContainer.
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const =0
virtual bool add(CCopasiObject *pObject, const bool &adopt=true)
virtual std::string getUnits() const
virtual void * getValuePointer() const
virtual const CObjectInterface * getObject(const CCopasiObjectName &cn) const
std::string getObjectName() const
CCopasiObject * addObjectReference(const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)