COPASI API  4.16.103
Public Member Functions | Protected Attributes | List of all members
CLLocalStyle Class Reference

#include <CLLocalStyle.h>

Inheritance diagram for CLLocalStyle:
Inheritance graph
[legend]
Collaboration diagram for CLLocalStyle:
Collaboration graph
[legend]

Public Member Functions

void addKey (const std::string &key)
 
 CLLocalStyle (CCopasiContainer *pParent=NULL)
 
 CLLocalStyle (const CLLocalStyle &source, CCopasiContainer *pParent=NULL)
 
 CLLocalStyle (const LocalStyle &source, CCopasiContainer *pParent=NULL)
 
const std::set< std::string > & getKeyList () const
 
size_t getNumKeys () const
 
bool isInKeyList (const std::string &key) const
 
bool isKeyInSet (const std::string &key) const
 
void removeKey (const std::string &key)
 
void setKeyList (const std::set< std::string > &keyList)
 
LocalStyle * toSBML (unsigned int level, unsigned int version) const
 
- Public Member Functions inherited from CLStyle
void addRole (const std::string &role)
 
void addSBMLAttributes (Style *pStyle) const
 
void addType (const std::string &type)
 
 CLStyle (const std::string &name, CCopasiContainer *pParent=NULL)
 
 CLStyle (const CLStyle &source, CCopasiContainer *pParent=NULL)
 
 CLStyle (const Style &source, const std::string &name, CCopasiContainer *pParent=NULL)
 
const CLGroupgetGroup () const
 
CLGroupgetGroup ()
 
const std::string & getKey () const
 
size_t getNumRoles () const
 
size_t getNumTypes () const
 
const std::set< std::string > & getRoleList () const
 
const std::set< std::string > & getTypeList () const
 
bool isInRoleList (const std::string &role) const
 
bool isInTypeList (const std::string &type) const
 
void removeRole (const std::string &role)
 
void removeType (const std::string &type)
 
void setGroup (const CLGroup *pGroup)
 
void setRoleList (const std::set< std::string > &roleList)
 
void setTypeList (const std::set< std::string > &typeList)
 
 ~CLStyle ()
 
- Public Member Functions inherited from CLBase
 CLBase ()
 
 CLBase (const CLBase &b)
 
 CLBase (const SBase &)
 
const std::string & getTag () const
 
bool hasTag () const
 
virtual void moveBy (const CLPoint &)
 
void setTag (const std::string &tag)
 
virtual ~CLBase ()
 
- Public Member Functions inherited from CCopasiContainer
virtual bool add (CCopasiObject *pObject, const bool &adopt=true)
 
 CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
 
 CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual bool remove (CCopasiObject *pObject)
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
void addDirectDependency (const CCopasiObject *pObject)
 
 CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL)
 
void clearDirectDependencies ()
 
void clearRefresh ()
 
bool dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const
 
void getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const
 
virtual CCopasiObjectName getCN () const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
virtual voidgetValuePointer () const
 
bool hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const
 
bool hasUpdateMethod () const
 
bool isArray () const
 
bool isContainer () const
 
bool isDataModel () const
 
bool isMatrix () const
 
bool isNameVector () const
 
bool isNonUniqueName () const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 
bool isReference () const
 
bool isRoot () const
 
bool isSeparator () const
 
bool isStaticString () const
 
bool isValueBool () const
 
bool isValueDbl () const
 
bool isValueInt () const
 
bool isValueInt64 () const
 
bool isValueString () const
 
bool isVector () const
 
virtual bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
virtual void print (std::ostream *ostream) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
void setObjectValue (const C_FLOAT64 &value)
 
void setObjectValue (const C_INT32 &value)
 
void setObjectValue (const bool &value)
 
template<class CType >
void setRefresh (CType *pType, void(CType::*method)(void))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const bool &))
 
virtual ~CCopasiObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Protected Attributes

std::set< std::string > mKeyList
 
- Protected Attributes inherited from CLStyle
std::string mKey
 
CLGroupmpGroup
 
std::set< std::string > mRoleList
 
std::set< std::string > mTypeList
 
- Protected Attributes inherited from CLBase
std::string mTag
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 

Additional Inherited Members

- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 
- Static Public Member Functions inherited from CLStyle
static std::string createStringFromSet (const std::set< std::string > &set)
 
static void readIntoSet (const std::string &s, std::set< std::string > &set)
 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
enum  Flag {
  Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8,
  Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80,
  ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800,
  Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000,
  Root = 0x10000, Gui = 0x20000
}
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 24 of file CLLocalStyle.h.

Constructor & Destructor Documentation

CLLocalStyle::CLLocalStyle ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 26 of file CLLocalStyle.cpp.

References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and CLStyle::mKey.

26  : CLStyle("LocalStyle", pParent)
27 {
28  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LocalStyle", this);
29 }
std::string mKey
Definition: CLStyle.h:41
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
CLStyle(const std::string &name, CCopasiContainer *pParent=NULL)
Definition: CLStyle.cpp:26
CLLocalStyle::CLLocalStyle ( const CLLocalStyle source,
CCopasiContainer pParent = NULL 
)

Copy Constructor.

Definition at line 34 of file CLLocalStyle.cpp.

References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and CLStyle::mKey.

34  :
35  CLStyle(source, pParent),
36  mKeyList(source.mKeyList)
37 {
38  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LocalStyle", this);
39 }
std::string mKey
Definition: CLStyle.h:41
std::string add(const std::string &prefix, CCopasiObject *pObject)
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
static CKeyFactory * getKeyFactory()
CLStyle(const std::string &name, CCopasiContainer *pParent=NULL)
Definition: CLStyle.cpp:26
CLLocalStyle::CLLocalStyle ( const LocalStyle &  source,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Definition at line 44 of file CLLocalStyle.cpp.

References CKeyFactory::add(), CLStyle::createStringFromSet(), CCopasiRootContainer::getKeyFactory(), CLStyle::mKey, mKeyList, and CLStyle::readIntoSet().

44  :
45  CLStyle(source, "LocalStyle", pParent)
46 {
47  this->mKey = CCopasiRootContainer::getKeyFactory()->add("LocalStyle", this);
49 }
static void readIntoSet(const std::string &s, std::set< std::string > &set)
Definition: CLStyle.cpp:168
std::string mKey
Definition: CLStyle.h:41
std::string add(const std::string &prefix, CCopasiObject *pObject)
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
static CKeyFactory * getKeyFactory()
CLStyle(const std::string &name, CCopasiContainer *pParent=NULL)
Definition: CLStyle.cpp:26
static std::string createStringFromSet(const std::set< std::string > &set)
Definition: CLStyle.cpp:182

Member Function Documentation

void CLLocalStyle::addKey ( const std::string &  key)

Adds another key to the set.

Definition at line 86 of file CLLocalStyle.cpp.

References mKeyList.

87 {
88  this->mKeyList.insert(key);
89 }
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
const std::set< std::string > & CLLocalStyle::getKeyList ( ) const

Returns the key list.

Definition at line 70 of file CLLocalStyle.cpp.

References mKeyList.

Referenced by SBMLDocumentLoader::convertLayoutObjectIds(), CLRenderResolver::fill_local_maps(), CLRenderFlattener::flatten(), and CCopasiXML::saveLocalStyle().

71 {
72  return this->mKeyList;
73 }
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
size_t CLLocalStyle::getNumKeys ( ) const

Returns the number of keys in the key set.

Definition at line 54 of file CLLocalStyle.cpp.

References mKeyList.

Referenced by CCopasiXML::saveLocalStyle().

55 {
56  return this->mKeyList.size();
57 }
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
bool CLLocalStyle::isInKeyList ( const std::string &  key) const

Checks whether a given key is in the role list.

bool CLLocalStyle::isKeyInSet ( const std::string &  key) const

Checks if a certain key is in the set or not.

Definition at line 78 of file CLLocalStyle.cpp.

References mKeyList.

79 {
80  return (this->mKeyList.find(key) != this->mKeyList.end());
81 }
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
void CLLocalStyle::removeKey ( const std::string &  key)

Removes an key from the set.

Definition at line 94 of file CLLocalStyle.cpp.

References mKeyList.

95 {
96  this->mKeyList.erase(key);
97 }
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
void CLLocalStyle::setKeyList ( const std::set< std::string > &  keyList)

Sets the key list.

Definition at line 62 of file CLLocalStyle.cpp.

References mKeyList.

Referenced by SBMLDocumentLoader::convertLayoutObjectIds(), and CCopasiXMLParser::LocalStyleElement::start().

63 {
64  this->mKeyList = keyList;
65 }
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
LocalStyle * CLLocalStyle::toSBML ( unsigned int  level,
unsigned int  version 
) const

Converts this object to the corresponding SBML object.

Definition at line 102 of file CLLocalStyle.cpp.

References CLStyle::addSBMLAttributes(), CLStyle::createStringFromSet(), mKeyList, and CLStyle::readIntoSet().

Referenced by CLLocalRenderInformation::toSBML().

103 {
104  LocalStyle* pLS = new LocalStyle(level, version);
105  this->addSBMLAttributes(pLS);
106  std::set<std::string> s;
108  pLS->setIdList(s);
109  return pLS;
110 }
static void readIntoSet(const std::string &s, std::set< std::string > &set)
Definition: CLStyle.cpp:168
void addSBMLAttributes(Style *pStyle) const
Definition: CLStyle.cpp:237
std::set< std::string > mKeyList
Definition: CLLocalStyle.h:27
static std::string createStringFromSet(const std::set< std::string > &set)
Definition: CLStyle.cpp:182

Member Data Documentation

std::set<std::string> CLLocalStyle::mKeyList
protected

The documentation for this class was generated from the following files: