The Gnome Chemistry Utils  0.14.2
Public Member Functions | List of all members
gcp::MesomeryArrow Class Reference

#include <gcp/mesomery-arrow.h>

Inheritance diagram for gcp::MesomeryArrow:
gcp::Arrow gcu::Object gccv::ItemClient

Public Member Functions

 MesomeryArrow (Mesomery *mesomery)
virtual ~MesomeryArrow ()
xmlNodePtr Save (xmlDocPtr xml) const
bool Load (xmlNodePtr node)
void AddItem ()
void UpdateItem ()
void SetStartMesomer (Mesomer *mesomer)
Mesomer * GetStartMesomer ()
void SetEndMesomer (Mesomer *mesomer)
Mesomer * GetEndMesomer ()
void Reverse ()
std::string Name ()
- Public Member Functions inherited from gcp::Arrow
 Arrow (gcu::TypeId Type)
virtual ~Arrow ()
void SetSelected (int state)
void SetCoords (double xstart, double ystart, double xend, double yend)
bool GetCoords (double *xstart, double *ystart, double *xend, double *yend) const
bool GetCoords (double *x, double *y, double *z=NULL) const
void Move (double x, double y, double z=0)
void Transform2D (gcu::Matrix2D &m, double x, double y)
double GetYAlign ()
bool SetProperty (unsigned property, char const *value)
void SetStartStep (Step *step)
Step ** GetStartStepPtr ()
Step * GetStartStep () const
void SetEndStep (Step *step)
Step * GetEndStep () const
Step ** GetEndStepPtr ()
void RemoveStep (Step *step)
double GetLength (void) const
- Public Member Functions inherited from gcu::Object
 Object (TypeId Id=OtherType)
virtual ~Object ()
TypeId GetType () const
void SetId (gchar const *Id)
char const * GetId () const
virtual void AddChild (Object *object)
Object * GetMolecule () const
Object * GetReaction () const
Object * GetGroup () const
Document * GetDocument () const
Application * GetApplication () const
Object * GetParentOfType (TypeId Id) const
Object * GetChild (const gchar *Id) const
Object * GetFirstChild (std::map< std::string, Object * >::iterator &i)
Object * GetNextChild (std::map< std::string, Object * >::iterator &i)
Object * GetDescendant (const char *Id) const
Object * GetParent () const
void SetParent (Object *Parent)
bool SaveChildren (xmlDocPtr xml, xmlNodePtr node) const
void SaveId (xmlNodePtr node) const
xmlNodePtr GetNodeByProp (xmlNodePtr node, char const *Property, char const *Id)
xmlNodePtr GetNextNodeByProp (xmlNodePtr node, char const *Property, char const *Id)
xmlNodePtr GetNodeByName (xmlNodePtr node, char const *Name)
xmlNodePtr GetNextNodeByName (xmlNodePtr node, char const *Name)
bool HasChildren () const
unsigned GetChildrenNumber () const
virtual Object * GetAtomAt (double x, double y, double z=0.)
virtual bool Build (std::set< Object * > const &Children) throw (std::invalid_argument)
virtual bool BuildContextualMenu (UIManager *uim, Object *object, double x, double y)
void EmitSignal (SignalId Signal)
virtual bool OnSignal (SignalId Signal, Object *Child)
void Lock (bool state=true)
bool IsLocked ()
Object * GetFirstLink (std::set< Object * >::iterator &i)
Object * GetNextLink (std::set< Object * >::iterator &i)
void Link (Object *object)
void Unlink (Object *object)
virtual void OnUnlink (Object *object)
void GetPossibleAncestorTypes (std::set< TypeId > &types) const
virtual std::string GetProperty (unsigned property) const
void SetDirty (bool dirty=true)
virtual void Clear ()
std::string Identity ()
virtual char const * HasPropertiesDialog () const
virtual bool CanSelect () const
virtual void NotifyEmpty ()
void ShowPropertiesDialog ()
bool GetDirty (void) const
- Public Member Functions inherited from gccv::ItemClient
 ItemClient ()
virtual ~ItemClient ()
Item * GetItem (void)

Additional Inherited Members

- Static Public Member Functions inherited from gcu::Object
static TypeId AddType (std::string TypeName, Object *(*CreateFunc)(), TypeId id=OtherType)
static void AddAlias (TypeId id, std::string TypeName)
static Object * CreateObject (const std::string &TypeName, Object *parent=NULL)
static TypeId GetTypeId (const std::string &Name)
static std::string GetTypeName (TypeId Id)
static void AddMenuCallback (TypeId Id, BuildMenuCb cb)
static void AddRule (TypeId type1, RuleId rule, TypeId type2)
static void AddRule (const std::string &type1, RuleId rule, const std::string &type2)
static const std::set< TypeId > & GetRules (TypeId type, RuleId rule)
static const std::set< TypeId > & GetRules (const std::string &type, RuleId rule)
static void SetCreationLabel (TypeId Id, std::string Label)
static const std::string & GetCreationLabel (TypeId Id)
static const std::string & GetCreationLabel (const std::string &TypeName)
static SignalId CreateNewSignalId ()
- Protected Member Functions inherited from gcp::Arrow
bool Save (xmlDocPtr xml, xmlNodePtr node) const
void OnLoaded ()
- Protected Attributes inherited from gcp::Arrow
double m_x
double m_y
double m_width
double m_height

Detailed Description

Arrow class for double headed arrows used in mesomery relationships.

Definition at line 38 of file mesomery-arrow.h.

Constructor & Destructor Documentation

gcp::MesomeryArrow::MesomeryArrow ( Mesomery *  mesomery)
Parameters
mesomerythe parent mesomery relationship if any.

Constructs a mesomery arrow. If mesomery is not NULL, the arrow becomes is added to its children list.

virtual gcp::MesomeryArrow::~MesomeryArrow ( )
virtual

The destructor.

Member Function Documentation

void gcp::MesomeryArrow::AddItem ( )
virtual

Used to add a representation of the arrow in the view.

Reimplemented from gccv::ItemClient.

Mesomer* gcp::MesomeryArrow::GetEndMesomer ( )
inline
Returns
the mesomer at last end of the arrow.

Definition at line 96 of file mesomery-arrow.h.

Mesomer* gcp::MesomeryArrow::GetStartMesomer ( )
inline
Returns
the mesomer at first end of the arrow.

Definition at line 85 of file mesomery-arrow.h.

bool gcp::MesomeryArrow::Load ( xmlNodePtr  node)
virtual
Parameters
node,:a pointer to the xmlNode containing the serialized arrow.

Used to load an arrow in memory.

Returns
true on succes, false otherwise.

Reimplemented from gcp::Arrow.

std::string gcp::MesomeryArrow::Name ( )
virtual
Returns
the localized object generic name.

Reimplemented from gcp::Arrow.

void gcp::MesomeryArrow::Reverse ( )

Exchange both ends or the arrow and their associated mesomers.

Reimplemented from gcp::Arrow.

xmlNodePtr gcp::MesomeryArrow::Save ( xmlDocPtr  xml) const
virtual
Parameters
xmlthe xmlDoc used to save the document.

Used to save the arrow to the xmlDoc.

Returns
the xmlNode containing the serialized arrow.

Reimplemented from gcu::Object.

void gcp::MesomeryArrow::SetEndMesomer ( Mesomer *  mesomer)
inline
Parameters
mesomera mesomer

Sets mesomer at last end of the arrow. This does not affect coordinates, alignment is dealt with elsewhere.

Definition at line 92 of file mesomery-arrow.h.

void gcp::MesomeryArrow::SetStartMesomer ( Mesomer *  mesomer)
inline
Parameters
mesomera mesomer

Sets mesomer at first end of the arrow. This does not affect coordinates, alignment is dealt with elsewhere.

Definition at line 81 of file mesomery-arrow.h.

void gcp::MesomeryArrow::UpdateItem ( )
virtual

Used to update the representation of the arrow in the view.

Reimplemented from gccv::ItemClient.


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