copasi API  0.1
Public Types | Public Member Functions | Static Public Attributes
CSlider Class Reference

#include <CSlider.h>

Inheritance diagram for CSlider:
CCopasiContainer CCopasiObject

List of all members.

Public Types

enum  Type {
  Float = 0, UnsignedFloat, Integer, UnsignedInteger,
  Undefined
}
enum  Scale { linear = 0, logarithmic, undefinedScale }

Public Member Functions

 CSlider (const std::string &name="Slider", const CCopasiContainer *pParent=NULL)
 CSlider (const CSlider &src, const CCopasiContainer *pParent=NULL)
 ~CSlider ()
bool compile (const std::vector< CCopasiContainer * > &listOfContainer=CCopasiContainer::EmptyList)
const std::string & getKey () const
bool setAssociatedEntityKey (const std::string &associatedEntityKey)
const std::string & getAssociatedEntityKey () const
bool setSliderObject (CCopasiObject *pObject)
bool setSliderObject (const CCopasiObjectName &objectCN)
CCopasiObjectgetSliderObject ()
const std::string & getSliderObjectCN () const
bool setSliderType (const CSlider::Type type)
CSlider::Type getSliderType () const
bool setOriginalValue (const C_FLOAT64 value)
const C_FLOAT64 & getOriginalValue () const
bool setSliderValue (const C_FLOAT64 value, const bool &writeToObject=true)
void resetValue ()
const C_FLOAT64 & getSliderValue () const
bool setMinValue (const C_FLOAT64 minValue)
const C_FLOAT64 & getMinValue () const
bool setMaxValue (const C_FLOAT64 maxValue)
const C_FLOAT64 & getMaxValue () const
bool setTickNumber (const unsigned C_INT32 tickNumber)
unsigned C_INT32 getTickNumber () const
bool setTickFactor (const unsigned C_INT32 tickFactor)
unsigned C_INT32 getTickFactor () const
bool setScaling (Scale scaling)
Scale getScaling () const
void resetRange ()
void setSynced (bool synced)
bool getSynced () const
void sync ()
void writeToObject ()
Scale convertScaleNameToScale (const char *scaleName)
const char * convertScaleToScaleName (Scale scale)

Static Public Attributes

static const char * TypeName []
static const char * ScaleName []

Member Enumeration Documentation

Enum of valid scales

Enumerator:
linear 
logarithmic 
undefinedScale 

Enum of valid quantitye units

Enumerator:
Float 
UnsignedFloat 
Integer 
UnsignedInteger 
Undefined 

Constructor & Destructor Documentation

CSlider::CSlider ( const std::string &  name = "Slider",
const CCopasiContainer pParent = NULL 
)

Default constructor

Parameters:
conststd::string & name (default: "NoName")
constCCopasiContainer * pParent (default: NULL)
CSlider::CSlider ( const CSlider src,
const CCopasiContainer pParent = NULL 
)

Copy constructor

Parameters:
constCSlider & src
constCCopasiContainer * pParent (default: NULL)
CSlider::~CSlider ( )

Destructor.


Member Function Documentation

bool CSlider::compile ( const std::vector< CCopasiContainer * > &  listOfContainer = CCopasiContainer::EmptyList)

Compile, i.e., find the objects pointed to by the CN.

Parameters:
conststd::vector< CCopasiContainer * > & listOfContainer (default: CCopasiContainer::EmptyList)
Returns:
bool success
CSlider::Scale CSlider::convertScaleNameToScale ( const char *  scaleName)

Converts the scaling name to the corresponding enum.

Returns:
CSlider::Scale
const char * CSlider::convertScaleToScaleName ( Scale  scale)

Converts the scaling name to the corresponding enum.

Returns:
const char* scaleName
const std::string & CSlider::getAssociatedEntityKey ( ) const

Retrieve the key of the associated entity.

Returns:
const std::string & associatedEntityKey
const std::string & CSlider::getKey ( ) const [virtual]

Retrieve the key

Returns:
const std::string & key

Reimplemented from CCopasiObject.

const C_FLOAT64 & CSlider::getMaxValue ( ) const

Retrieve the slider maximum value.

Returns:
const C_FLOAT64 & maxValue
const C_FLOAT64 & CSlider::getMinValue ( ) const

Retrieve the slider minimum value.

Returns:
const C_FLOAT64 minValue
const C_FLOAT64 & CSlider::getOriginalValue ( ) const

Retrieve the original slider Value.

Returns:
const C_FLOAT64 Value
CSlider::Scale CSlider::getScaling ( ) const

Retrieve the scaling of the slider.

Returns:
Scale scaling
CCopasiObject * CSlider::getSliderObject ( )

Retrieve the slider object.

Returns:
CCopasiObject * pObject
const std::string & CSlider::getSliderObjectCN ( ) const

Retrieve the slider object CN.

Returns:
const std::string & sliderObjectCN
CSlider::Type CSlider::getSliderType ( ) const

Retrieve the slider type.

Returns:
const CSlider::Type type
const C_FLOAT64 & CSlider::getSliderValue ( ) const

Retrieve the slider Value.

Returns:
const C_FLOAT64 Value
bool CSlider::getSynced ( ) const

Returns wether the value is to be kept in sync the the objects value.

Returns:
bool isSynced.
unsigned C_INT32 CSlider::getTickFactor ( ) const

Retrieve the tick factor.

Returns:
const unsigned C_INT32 & tickFactor
unsigned C_INT32 CSlider::getTickNumber ( ) const

Retrieve the tick number.

Returns:
const unsigned C_INT32 & tickNumber
void CSlider::resetRange ( )

Reset the minimum and maximum value to defaults. For the minimum this is half the current value. For the maximum this is twice the current value.

void CSlider::resetValue ( )

Sets the value of the slider back to it's original value.

bool CSlider::setAssociatedEntityKey ( const std::string &  associatedEntityKey)

Set the key of the associated entity

Parameters:
conststd::string & associatedEntityKey
Returns:
bool succes
bool CSlider::setMaxValue ( const C_FLOAT64  maxValue)

Set the slider maximum value.

Parameters:
constC_FLOAT64 maxValue
Returns:
bool succes
bool CSlider::setMinValue ( const C_FLOAT64  minValue)

Set the slider minimum value.

Parameters:
constC_FLOAT64 minValue
Returns:
bool succes
bool CSlider::setOriginalValue ( const C_FLOAT64  value)

Set the sliders original value.

Parameters:
constC_FLOAT64 Value
constbool & writeToObject (Default: true)
Returns:
bool succes
bool CSlider::setScaling ( CSlider::Scale  scaling)

Set the scaling for the CSlider.

bool CSlider::setSliderObject ( CCopasiObject pObject)

Set the slider object.

Parameters:
CCopasiObject* pObject
Returns:
bool succes
bool CSlider::setSliderObject ( const CCopasiObjectName objectCN)

Set the slider object.

Parameters:
constCCopasiObjectName & objectCN
Returns:
bool succes
bool CSlider::setSliderType ( const CSlider::Type  type)

Set the slider type.

Parameters:
constCSlider::Type type
Returns:
bool succes
bool CSlider::setSliderValue ( const C_FLOAT64  value,
const bool &  writeToObject = true 
)

Set the slider value.

Parameters:
constC_FLOAT64 Value
constbool & writeToObject (Default: true)
Returns:
bool succes
void CSlider::setSynced ( bool  synced)

Sets wether the value is to be kept in sync the the objects value.

bool CSlider::setTickFactor ( const unsigned C_INT32  tickFactor)

Set the tick factor.

Parameters:
constunsigned C_INT32 & tickFactor
Returns:
bool succes
bool CSlider::setTickNumber ( const unsigned C_INT32  tickNumber)

Set the tick number.

Parameters:
constunsigned C_INT32 & tickNumber
Returns:
bool succes
void CSlider::sync ( )

Set the CSliders value to the value of the underlying object.

void CSlider::writeToObject ( )

Set the objects value to the value stored in CSlider.


Member Data Documentation

const char * CSlider::ScaleName [static]
Initial value:
  {"linear", "logarithmic", "undefined", NULL}

String representation of valid scalings

const char * CSlider::TypeName [static]
Initial value:
  {"float", "unsignedFloat", "integer", "unsignedInteger", "Undefined", NULL}

String representation of valid quantity units


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines