COPASI API
4.16.103
|
#include <CLColorDefinition.h>
Public Member Functions | |
CLColorDefinition (CCopasiContainer *pParent=NULL) | |
CLColorDefinition (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255, CCopasiContainer *pParent=NULL) | |
CLColorDefinition (const CLColorDefinition &source, CCopasiContainer *pParent=NULL) | |
CLColorDefinition (const ColorDefinition &source, CCopasiContainer *pParent=NULL) | |
std::string | createValueString () const |
unsigned char | getAlpha () const |
unsigned char | getBlue () const |
unsigned char | getGreen () const |
const std::string & | getId () const |
const std::string & | getKey () const |
unsigned char | getRed () const |
void | setAlpha (unsigned char c) |
void | setBlue (unsigned char c) |
bool | setColorValue (const std::string &valueString) |
void | setGreen (unsigned char c) |
void | setId (const std::string &id) |
void | setRed (unsigned char c) |
void | setRGBA (unsigned char r, unsigned char g, unsigned char b, unsigned char a=255) |
ColorDefinition * | toSBML (unsigned int level, unsigned int version) const |
virtual | ~CLColorDefinition () |
![]() | |
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 () |
![]() | |
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 DataObjectSet & | getDirectDependencies (const DataObjectSet &context=DataObjectSet()) const |
virtual const CObjectInterface * | getObject (const CCopasiObjectName &cn) const |
CCopasiContainer * | getObjectAncestor (const std::string &type) const |
CCopasiDataModel * | getObjectDataModel () |
const CCopasiDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName (bool regular=true, bool richtext=false) const |
const std::string & | getObjectName () const |
CCopasiContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const |
virtual Refresh * | getRefresh () const |
virtual std::string | getUnits () const |
UpdateMethod * | getUpdateMethod () const |
virtual const CCopasiObject * | getValueObject () const |
virtual void * | getValuePointer () 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 () |
![]() | |
CObjectInterface () | |
virtual | ~CObjectInterface () |
Protected Attributes | |
unsigned char | mAlpha |
unsigned char | mBlue |
unsigned char | mGreen |
std::string | mId |
std::string | mKey |
unsigned char | mRed |
![]() | |
std::string | mTag |
Private Member Functions | |
CLColorDefinition & | operator= (const CLColorDefinition &source) |
Additional Inherited Members | |
![]() | |
typedef std::set< const CCopasiObject * > | DataObjectSet |
typedef std::vector< Refresh * > | DataUpdateSequence |
![]() | |
typedef std::set< const CObjectInterface * > | ObjectSet |
typedef std::vector < CObjectInterface * > | UpdateSequence |
![]() | |
static std::vector< Refresh * > | buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet()) |
static void | setRenameHandler (CRenameHandler *rh) |
![]() | |
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 } |
![]() | |
CCopasiObject () | |
CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0) | |
![]() | |
static CRenameHandler * | smpRenameHandler = NULL |
Definition at line 25 of file CLColorDefinition.h.
CLColorDefinition::CLColorDefinition | ( | CCopasiContainer * | pParent = NULL | ) |
Contructor which sets the ColorDefinition to completely opaque black.
Contructor which sets the CLColorDefinition to completely opaque black.
Definition at line 33 of file CLColorDefinition.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
CLColorDefinition::CLColorDefinition | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b, | ||
unsigned char | a = 255 , |
||
CCopasiContainer * | pParent = NULL |
||
) |
Constructor which sets the ColorDefinition to the given RGBA values.
Constructor which sets the CLColorDefinition to the given RGBA values.
Definition at line 49 of file CLColorDefinition.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
CLColorDefinition::CLColorDefinition | ( | const CLColorDefinition & | source, |
CCopasiContainer * | pParent = NULL |
||
) |
Copy Contructor
Definition at line 65 of file CLColorDefinition.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
CLColorDefinition::CLColorDefinition | ( | const ColorDefinition & | source, |
CCopasiContainer * | pParent = NULL |
||
) |
Constructor to generate object from the corresponding SBML object.
Definition at line 81 of file CLColorDefinition.cpp.
References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.
|
virtual |
Dtor.
Definition at line 97 of file CLColorDefinition.cpp.
References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().
std::string CLColorDefinition::createValueString | ( | ) | const |
Creates a string the represents the current color value.
Definition at line 233 of file CLColorDefinition.cpp.
References mAlpha, mBlue, mGreen, and mRed.
Referenced by CCopasiXML::saveColorDefinition().
unsigned char CLColorDefinition::getAlpha | ( | ) | const |
Returns the alpha color component.
Definition at line 129 of file CLColorDefinition.cpp.
References mAlpha.
Referenced by CLLayoutRenderer::draw_layout(), getColor(), and CLLayoutRenderer::resolve_color().
unsigned char CLColorDefinition::getBlue | ( | ) | const |
Returns the blue color component.
Definition at line 121 of file CLColorDefinition.cpp.
References mBlue.
Referenced by CLLayoutRenderer::draw_layout(), getColor(), and CLLayoutRenderer::resolve_color().
unsigned char CLColorDefinition::getGreen | ( | ) | const |
Returns the green color component.
Definition at line 113 of file CLColorDefinition.cpp.
References mGreen.
Referenced by CLLayoutRenderer::draw_layout(), getColor(), and CLLayoutRenderer::resolve_color().
const std::string & CLColorDefinition::getId | ( | ) | const |
Returns the id of the object.
Definition at line 268 of file CLColorDefinition.cpp.
References mId.
Referenced by CLRenderResolver::fill_base_maps(), CLRenderFlattener::flatten(), and CCopasiXML::saveColorDefinition().
|
virtual |
Returns the key of the color definition.
Reimplemented from CCopasiObject.
Definition at line 249 of file CLColorDefinition.cpp.
References mKey.
unsigned char CLColorDefinition::getRed | ( | ) | const |
Returns the red color component.
Definition at line 105 of file CLColorDefinition.cpp.
References mRed.
Referenced by CLLayoutRenderer::draw_layout(), getColor(), and CLLayoutRenderer::resolve_color().
|
private |
void CLColorDefinition::setAlpha | ( | unsigned char | c | ) |
Sets alpha red color component.
Definition at line 161 of file CLColorDefinition.cpp.
References mAlpha.
void CLColorDefinition::setBlue | ( | unsigned char | c | ) |
Sets the blue color component.
Definition at line 153 of file CLColorDefinition.cpp.
References mBlue.
bool CLColorDefinition::setColorValue | ( | const std::string & | valueString | ) |
Sets the color value from a given string. If the string is not a valid value string, the color value is set to black and false is returned.
Definition at line 183 of file CLColorDefinition.cpp.
References mAlpha, mBlue, mGreen, and mRed.
Referenced by getColor(), CLLayoutRenderer::resolve_color(), CLRenderResolver::setBackgroundColor(), and CCopasiXMLParser::ColorDefinitionElement::start().
void CLColorDefinition::setGreen | ( | unsigned char | c | ) |
Sets the green color component.
Definition at line 145 of file CLColorDefinition.cpp.
References mGreen.
void CLColorDefinition::setId | ( | const std::string & | id | ) |
Sets the id of the object.
Definition at line 276 of file CLColorDefinition.cpp.
References mId.
Referenced by test000097::addGlobalRenderInformation(), test000097::addLocalRenderInformation(), and CCopasiXMLParser::ColorDefinitionElement::start().
void CLColorDefinition::setRed | ( | unsigned char | c | ) |
Sets the red color component.
Definition at line 137 of file CLColorDefinition.cpp.
References mRed.
void CLColorDefinition::setRGBA | ( | unsigned char | r, |
unsigned char | g, | ||
unsigned char | b, | ||
unsigned char | a = 255 |
||
) |
Sets the red green, blue and alpha color component. The alpha value is optional and defaults to 255 if not given.
Definition at line 170 of file CLColorDefinition.cpp.
References mAlpha, mBlue, mGreen, and mRed.
Referenced by test000097::addGlobalRenderInformation(), and test000097::addLocalRenderInformation().
ColorDefinition * CLColorDefinition::toSBML | ( | unsigned int | level, |
unsigned int | version | ||
) | const |
Converts this object to the corresponding SBML object.
Definition at line 257 of file CLColorDefinition.cpp.
References mAlpha, mBlue, mGreen, mId, and mRed.
Referenced by CLRenderInformationBase::addSBMLAttributes().
|
protected |
Definition at line 36 of file CLColorDefinition.h.
Referenced by createValueString(), getAlpha(), setAlpha(), setColorValue(), setRGBA(), and toSBML().
|
protected |
Definition at line 35 of file CLColorDefinition.h.
Referenced by createValueString(), getBlue(), setBlue(), setColorValue(), setRGBA(), and toSBML().
|
protected |
Definition at line 34 of file CLColorDefinition.h.
Referenced by createValueString(), getGreen(), setColorValue(), setGreen(), setRGBA(), and toSBML().
|
protected |
The color definition needs an id in addition to the key. The id corresponds to the id in the SBML render extension and it does not have to be globally unique. As a matter of fact, it is sometimes needed that color definitions of different render information have the same id.
Definition at line 49 of file CLColorDefinition.h.
|
protected |
The color definition needs a key.
Definition at line 41 of file CLColorDefinition.h.
Referenced by CLColorDefinition(), getKey(), and ~CLColorDefinition().
|
protected |
Definition at line 33 of file CLColorDefinition.h.
Referenced by createValueString(), getRed(), setColorValue(), setRed(), setRGBA(), and toSBML().