Cytosim PI Cytoskeleton Simulator

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members | Public Member Functions | Static Public Member Functions
Property Class Referenceabstract

## Detailed Description

A property is a list of parameters associated with a kind of object in the simulation

1. It is identified by kind() and name():
   - kind() indicates the type of object (eg. fiber, hand)
   - The name is unique to each instantiation and is set by the user (eg. actin, microtubule).
2. Methods mostly deal with input / output, which are done using Glossary.
3. clear(), read() and complete() should be defined to handle the parameters.

The customizable simulation object hold pointers to an associated Property. A Property defacto defines a class of objects. All the objects that point to the same property are of the same kind.

Inheritance diagram for Property:

## Public Member Functions
| Property (const std::string &n, const int index=-1)
| constructor must provide a name
virtual | ~Property ()
| destructor
virtual std::string | kind () const
| the 'kind' of property (a class identifier)
std::string | name () const
| return identifier for instantiation
void | name (const std::string &n)
| change name
bool | is_named (const std::string &n)
| true if 'name' matches
int | index () const
| index, unique among all Property of similar kind()
void | index (int x)
| set index in the array of Properties
virtual void | clear ()=0
| clear parameters to default values
virtual Property * | clone () const =0
| return new object of same class with identical parameters More...
bool | modified () const
| true if at least one value is different than its default setting
virtual void | read (Glossary &)=0
| set from a Glossary
void | readString (std::string &, char stamp)
| set from a string, return number of values assigned More...
void | readFile (const char file[])
| set from a string, return number of values assigned
virtual void | complete (SimulProp const *sp, PropertyList *plist)
| set variables derived from the parameters, and check consistency of values More...
virtual void | write_data (std::ostream &) const =0
| write values
void | write_diff (std::ostream &, const Property *ref) const
| write only values that differ from the ones specified in ref
void | write_diff (std::ostream &, bool prune) const
| if ( prune == true ), write values that differ from the default values
void | write (std::ostream &, bool prune=false) const
| write header + data More...

## Static Public Member Functions
template<typename C >
static void | write_param (std::ostream &os, std::string const &name, C const &c)
| formatted output of one parameter
template<typename C >
static void | write_param (std::ostream &os, std::string const &name, C const *c, int cnt)
| formatted output of one parameter
template<typename C , typename D >
static void | write_param (std::ostream &os, std::string const &name, C const &c, D const &d)
| formatted output of one parameter
template<typename C , typename D , typename E >
static void | write_param (std::ostream &os, std::string const &name, C const &c, D const &d, E const &e)
| formatted output of one parameter
template<typename C , typename D , typename E , typename F >
static void | write_param (std::ostream &os, std::string const &name, C const &c, D const &d, E const &e, F const &f)
| formatted output of one parameter

## Member Function Documentation

virtual Property* clone | ( |  | ) | const
| pure virtual

The new object is created with `new` and should be destroyed with `delete`

Implemented in SimulProp, FiberDisp, FiberProp, HandProp, ViewProp, ClassicFiberProp, PointDisp, PlayProp, NucleatorProp, CoupleProp, SingleProp, glAppProp, SphereProp, DisplayProp, NucleusProp, DynamicFiberProp, AsterProp, BeadProp, TubuleProp, MotorProp, SpaceProp, TreadmillingFiberProp, MightyProp, BundleProp, FieldProp, SliderProp, RescuerProp, TrackerProp, BridgeProp, CrosslinkProp, FakeProp, CutterProp, ForkProp, ActorProp, and ShackleProp.

virtual void complete | ( | SimulProp const * | sp,
|  | PropertyList * | plist
| ) |  |
| inline virtual

The arguments provide the global SimulProp, and the list of all known Property. Any Property created within this function should be added to plist. complete() is usually called after read()

Reimplemented in SimulProp, FiberProp, HandProp, ClassicFiberProp, NucleatorProp, CoupleProp, SingleProp, SphereProp, NucleusProp, DynamicFiberProp, AsterProp, BeadProp, TubuleProp, TreadmillingFiberProp, SpaceProp, BundleProp, FieldProp, MotorProp, MightyProp, SliderProp, RescuerProp, TrackerProp, BridgeProp, CrosslinkProp, FakeProp, CutterProp, ForkProp, ActorProp, and ShackleProp.

void readString | ( | std::string & | str,
|  | char | stamp
| ) |  |

parse string str to set values of the property.

the stamp feature limits parsing to only one pass:

- parsing is done only if stamp is not found.
- after parsing, stamp is added at the end of the string

If stamp is zero, parsing is always done. /

void write | ( | std::ostream & | os,
|  | bool | prune = `false`
| ) |  | const

This writes:

set kind [index] name
{
key = values
...
}