The Gnome Chemistry Utils 0.13.3
Public Member Functions
gcp::Mesomer Class Reference

#include <gcp/mesomer.h>

Inheritance diagram for gcp::Mesomer:
gcp::MechanismStep gcu::Object

List of all members.

Public Member Functions

 Mesomer ()
virtual ~Mesomer ()
 Mesomer (Mesomery *mesomery, Molecule *molecule) throw (std::invalid_argument)
 Mesomer (Mesomery *mesomery, MechanismStep *step) throw (std::invalid_argument)
bool Load (xmlNodePtr node)
bool OnSignal (gcu::SignalId Signal, gcu::Object *Child)
double GetYAlign ()
void AddArrow (MesomeryArrow *arrow, Mesomer *mesomer) throw (std::invalid_argument)
void RemoveArrow (MesomeryArrow *arrow, Mesomer *mesomer)
bool Validate ()
std::map< Mesomer
*, MesomeryArrow * > * 
GetArrows ()
MoleculeGetMolecule ()
std::string Name ()

Detailed Description

Represents one esomeric form in a mesomery relationship.

Definition at line 43 of file mesomer.h.


Constructor & Destructor Documentation

gcp::Mesomer::Mesomer ( )

The default constructor.

virtual gcp::Mesomer::~Mesomer ( ) [virtual]

The destructor.

gcp::Mesomer::Mesomer ( Mesomery mesomery,
Molecule molecule 
) throw (std::invalid_argument)
Parameters:
mesomerythe parent Mesomery.
moleculethe molecule of the mesomeric form.

Constructs a Mesomer from its parent Mesomery and a molecule. If one of them is invalid, it throws an std::invalid_argument exception and should be destroyed since it is invalid.

gcp::Mesomer::Mesomer ( Mesomery mesomery,
MechanismStep step 
) throw (std::invalid_argument)
Parameters:
mesomerythe parent Mesomery.
stepa mesomeric form with curved arrows.

Constructs a Mesomer from its parent Mesomery and a molecule with at least one curved arrow. If one of them is invalid, it throws an std::invalid_argument exception and should be destroyed since it is invalid.


Member Function Documentation

void gcp::Mesomer::AddArrow ( MesomeryArrow arrow,
Mesomer mesomer 
) throw (std::invalid_argument)
Parameters:
arrowa mesomery arrow
mesomerthe mesomer at the other end of the arrow.

Adds the arrow to the arrows map. See Mesomer::GetArrows().

std::map<Mesomer *, MesomeryArrow *>* gcp::Mesomer::GetArrows ( ) [inline]
Returns:
the map of all arrows pointing to this mesomer indexed by the mesomer at the other end of the arrow.

Definition at line 120 of file mesomer.h.

Molecule* gcp::Mesomer::GetMolecule ( void  ) [inline]
Returns:
th molecule associated with this mesomer.

Definition at line 124 of file mesomer.h.

double gcp::Mesomer::GetYAlign ( ) [virtual]

Used to retrieve the y coordinate for alignment. Calls gcp::Molecule::GetYAlign for the embedded molecule and returns the result.

Returns:
y coordinate used for alignment.

Reimplemented from gcp::MechanismStep.

bool gcp::Mesomer::Load ( xmlNodePtr  node) [virtual]
Parameters:
nodea pointer to the xmlNode containing the serialized object.

Used to load a mesomer in memory. The mesomer must already exist.

Returns:
true on succes, false otherwise.

Reimplemented from gcp::MechanismStep.

std::string gcp::Mesomer::Name ( ) [virtual]
Returns:
the localized object generic name.

Reimplemented from gcp::MechanismStep.

bool gcp::Mesomer::OnSignal ( gcu::SignalId  Signal,
gcu::Object Child 
) [virtual]
Parameters:
Signalthe appropriate SignalId
Childthe child which emitted the signal or NULL

This function is called by the framework when a signal has been emitted for the mesomer. It should not be called by a program; call Object::EmitSignal instead.

Returns:
true if the signal should be propagated to the parent, false otherwise.

Reimplemented from gcp::MechanismStep.

void gcp::Mesomer::RemoveArrow ( MesomeryArrow arrow,
Mesomer mesomer 
)
Parameters:
arrowa mesomery arrow
mesomerthe mesomer at the other end of the arrow.

Removes the arrow from the arrows map. See Mesomer::GetArrows().

bool gcp::Mesomer::Validate ( ) [inline]
Returns:
true if the mesomer is associated with at least one mesomery arrow, false otherwise. See gp::Mesomery::Validtae() for more information.

Definition at line 115 of file mesomer.h.


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