# gcp::ReactionProp Class Reference

`#include <gcp/reaction-prop.h>`

Inheritance diagram for gcp::ReactionProp:

List of all members.

## Public Member Functions

| ReactionProp ()
| ReactionProp (ReactionArrow *parent, gcu::Object *child)
| ~ReactionProp ()
xmlNodePtr | Save (xmlDocPtr xml)
bool | Load (xmlNodePtr node)
bool | OnSignal (gcu::SignalId Signal, gcu::Object *Child)
gcu::Object * | GetObject (void)
void | SetRole (unsigned val)
unsigned | GetRole (void) const
unsigned & | GetRefRole (void)

## Detailed Description

This is a container class for objects attached to a reaction arrow.

Definition at line 98 of file reaction-prop.h.

## Constructor & Destructor Documentation

gcp::ReactionProp::ReactionProp | ( |  | ) |

The default constructor.

gcp::ReactionProp::ReactionProp | ( | ReactionArrow * | parent,
|  | gcu::Object * | child |
| ) |  |  |

Parameters:

  | parent | the parent reaction arrow.
  | child | the molecule or text to attach to the arrow.

Builds a new reactionproperty, and attach the child to the arrow.

gcp::ReactionProp::~ReactionProp | ( |  | ) |

The destructor.

## Member Function Documentation

xmlNodePtr gcp::ReactionProp::Save | ( | xmlDocPtr | xml | ) |

Parameters:

  | xml | the xmlDoc used to save the document.

Used to save the reaction property to the xmlDoc.

Returns:
  the xmlNode containing the serialized reaction property.

bool gcp::ReactionProp::Load | ( | xmlNodePtr | node | ) | `[virtual]`

Parameters:

  | node,: | a pointer to the xmlNode containing the serialized reaction property.

Used to load a reaction property in memory.

Returns:
  true on succes, false otherwise.

Reimplemented from gcu::Object.

bool gcp::ReactionProp::OnSignal | ( | gcu::SignalId | Signal,
|  | gcu::Object * | Child |
| ) |  |  | `[virtual]`

Parameters:

  | Signal | the appropriate SignalId
  | Child | the child which emitted the signal or NULL

This function is called by the framework when a signal has been emitted for the reaction property, when one its emedded object changed. It should not be called by a program; call Object::EmitSignal instead.

Returns:
  true to be propagate the signal to the parent.

Reimplemented from gcu::Object.

gcp::ReactionProp::GetObject | ( | void |  | ) | `[inline]`

Returns:
  the embedded object.

Definition at line 147 of file reaction-prop.h.

gcp::ReactionProp::SetRole | ( | unsigned | Role | ) | `[inline]`

Parameters:

  | Role | the new role for the property.

Sets the role for the property which should be less than REACTION_PROP_MAX.

Definition at line 159 of file reaction-prop.h.

gcp::ReactionProp::GetRole | ( | void |  | ) | const`[inline]`

Returns:
  the property role.

Definition at line 159 of file reaction-prop.h.

gcp::ReactionProp::GetRefRole | ( | void |  | ) | `[inline]`

Returns:
  the property role as a reference.

Definition at line 159 of file reaction-prop.h.

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

- reaction-prop.h