The Gnome Chemistry Utils
0.14.0
|
The Gnome Chemistry Utils C++ classes. More...
Classes | |
class | Application |
class | Atom |
class | AtomPair |
class | AtomMatchState |
class | Bond |
struct | ChainElt |
class | Chain |
class | Chem3dDoc |
class | CmdContext |
error output channel. More... | |
class | Cycle |
class | Cylinder |
This class represents and draws a cylinder. More... | |
class | DialogOwner |
class | Dialog |
class | Document |
class | Element |
Chemical element. More... | |
class | parse_error |
class | FormulaElt |
class | FormulaAtom |
class | FormulaBlock |
class | FormulaResidue |
Residue. More... | |
class | Formula |
class | GLDocument |
class | GLView |
class | Isotope |
class | IsotopicPattern |
struct | LoaderStruct |
class | Loader |
class used to implement serialization engines. More... | |
class | Matrix |
class | GLMatrix |
class | Matrix2D |
class | Molecule |
class | Object |
struct | SymbolResidue |
class | Residue |
class | SpaceGroup |
Handle crystallographic space group symmetry. More... | |
class | Sphere |
class | Transform3d |
Handle 3D transformations, such as space group definitions. More... | |
class | UIManager |
base class for a user interface manager More... | |
class | Value |
class | SimpleValue |
class | DimensionalValue |
class | StringValue |
class | LocalizedStringValue |
class | Vector |
3D vector. More... | |
class | Vector3f |
class | Window |
Typedefs | |
typedef unsigned | TypeId |
typedef bool(* | BuildMenuCb )(Object *target, UIManager *uim, Object *object, double x, double y) |
typedef unsigned | SignalId |
Enumerations | |
enum | Display3DMode |
enum | Action { ActionException, ActionDelete, ActionIgnore } |
enum | FormulaParseMode |
enum | MatrixType |
enum | GcuTypeId |
enum | RuleId |
enum | ContentType { ContentTypeUnknown, ContentType3D, ContentType2D, ContentTypeCrystal, ContentTypeSpectrum, ContentTypeMisc, ContentTypeInvalid } |
Functions | |
Vector | operator* (double f, Vector const &v) |
Vector3f | operator* (float f, Vector3f const &v) |
xmlNodePtr | FindNodeByNameAndId (xmlNodePtr node, const char *name, const char *id=NULL) |
bool | ReadPosition (xmlNodePtr node, const char *id, double *x, double *y, double *z=NULL) |
bool | WritePosition (xmlDocPtr xml, xmlNodePtr node, const char *id, double x, double y, double z=0.0) |
bool | ReadColor (xmlNodePtr node, const char *id, float *red, float *green, float *blue, float *alpha=NULL) |
bool | WriteColor (xmlDocPtr xml, xmlNodePtr node, const char *id, double red, double green, double blue, double alpha=1.0) |
GOColor | ReadColor (xmlNodePtr node) |
void | WriteColor (xmlNodePtr node, GOColor color) |
bool | ReadRadius (xmlNodePtr node, GcuAtomicRadius &radius) |
bool | WriteRadius (xmlDocPtr xml, xmlNodePtr node, const GcuAtomicRadius &radius) |
char const * | GetStaticScale (char *buf) |
void | WriteFloat (xmlNodePtr node, char const *name, double value) |
bool | ReadFloat (xmlNodePtr node, char const *name, double &value, double default_value=0.) |
void | WriteInt (xmlNodePtr node, char const *name, int value) |
bool | ReadInt (xmlNodePtr node, char const *name, int &value, int default_value=0) |
void | WriteDate (xmlNodePtr node, char const *name, GDate const *date) |
bool | ReadDate (xmlNodePtr node, char const *name, GDate *date) |
The Gnome Chemistry Utils C++ classes.
The namespace used for all C++ classes provided by the Gnome Chemistry Utils base library.
typedef bool(* gcu::BuildMenuCb)(Object *target, UIManager *uim, Object *object, double x, double y) |
typedef unsigned gcu::SignalId |
The types of the signals used in Object::EmitSignal() and Object::OnSignal(). Each signal must type be retrieved from a call to Object::CreateNewSignalId().
typedef unsigned gcu::TypeId |
The type of an object instance. Either predefined types are defined in the enum above or dynamically defined types by calls to Object::AddType.
enum gcu::Action |
gcu/document.h Represents what should be done when an error occurs on an object.
ActionException |
Throw an exception |
ActionDelete |
Delete the object |
ActionIgnore |
Ignore the error |
Definition at line 49 of file gcu/document.h.
enum gcu::ContentType |
The list of supported data types.
Definition at line 35 of file gcu/structs.h.
enum gcu::Display3DMode |
3D display mode. Possible values are:
Definition at line 45 of file chem3ddoc.h.
gcu/formula.h The way formula should be interpreted when they contain symbols that might represent both an atom or a group of atoms such as Ac and Pr. Possible values are:
enum gcu::GcuTypeId |
This enumeration is used to determine the type of an Object instance. Possible values are:
Some types are not used in the Gnome Chemistry Utils, but only in GChemPaint and might disappear from this list in future versions and replaced by dynamically created types.
enum gcu::MatrixType |
This enumeration is used to determine the type a Matrix. Possible values are:
This enumeration is used in one of the constructors (Matrix(Psi, Theta, Phi, Type)) of class Matrix.
enum gcu::RuleId |
This enumeration is used to maintain a set of rules about the possible hierarchical of the document. They are used with two class names or ids. Possible values are:
xmlNodePtr gcu::FindNodeByNameAndId | ( | xmlNodePtr | node, |
const char * | name, | ||
const char * | id = NULL |
||
) |
ReadPosition
node,: | a pointer to the current parsed XML Node. |
name,: | the name of the searched node. |
id,: | the id property of the node or NULL if not significant. This parameter might be omitted in the last case. |
Helper method used to search the xmlNode instance of name Name and with id property equal to id in the children of node. When id is NULL, the searched node does not have an id property. When id is not NULL, the searched node should be unique.
char const* gcu::GetStaticScale | ( | char * | buf | ) |
buf,: | a string to convert to a static instance. |
This function is used to replace a dynamically allocated string by a static instance. It works managing a set of string instances. It is used for scale names (as for radii and electronegativity), hence its name.
Vector gcu::operator* | ( | double | f, |
Vector const & | v | ||
) |
f | a multiplication factor |
v | the vector to multiply |
Vector3f gcu::operator* | ( | float | f, |
Vector3f const & | v | ||
) |
f | a multiplication factor |
v | the vector to multiply |
bool gcu::ReadColor | ( | xmlNodePtr | node, |
const char * | id, | ||
float * | red, | ||
float * | green, | ||
float * | blue, | ||
float * | alpha = NULL |
||
) |
node,: | a pointer to the xmlNode representing an Object instance. |
id,: | the value of the id property of the color. This is used for Object instances having at least two colors. |
red,: | a pointer to the red component of the color. |
green,: | a pointer to the green component of the color. |
blue,: | a pointer to the blue component of the color. |
alpha,: | a pointer to the alpha component of the color or NULL if tranparency is not managed. |
This method can be used to load a color in an Object instance. It should be used in cunjunction with WriteColor() which executes the inverse operation. If id is NULL, a color with no id property will be search and parsed.
GOColor gcu::ReadColor | ( | xmlNodePtr | node | ) |
node,: | a pointer to the xmlNode from which the color must be retrieved. Builds a GOColor from the node properties. |
bool gcu::ReadDate | ( | xmlNodePtr | node, |
char const * | name, | ||
GDate * | date | ||
) |
node | a pointer to an XML node. |
name | the property name. |
date | where to store the result. |
Retrieves date from the node property with name name. On failure, date will be cleared using g_date_clear().
bool gcu::ReadFloat | ( | xmlNodePtr | node, |
char const * | name, | ||
double & | value, | ||
double | default_value = 0. |
||
) |
node | a pointer to an XML node. |
name | the property name. |
value | where to store the result. |
default_value | the default value for the property if the property can't be retrieved. |
Retrieves value from the node property with name name. Sets the default value if somthing goes wrong. This method is locale independent.
bool gcu::ReadInt | ( | xmlNodePtr | node, |
char const * | name, | ||
int & | value, | ||
int | default_value = 0 |
||
) |
node | a pointer to an XML node. |
name | the property name. |
value | where to store the result. |
default_value | the default value for the property if the property can't be retrieved. |
Retrieves value from the node property with name name. Sets the default value if somthing goes wrong.
bool gcu::ReadPosition | ( | xmlNodePtr | node, |
const char * | id, | ||
double * | x, | ||
double * | y, | ||
double * | z = NULL |
||
) |
node,: | a pointer to the xmlNode representing an Object instance. |
id,: | the value of the id property of the position. This is used for example for arrows because both the head and the tail of the arrow are positions. |
x,: | a pointer to the x coordinate of the position. |
y,: | a pointer to the y coordinate of the position. |
z,: | a pointer to the z coordinate of the position or NULL for 2D objects. |
This method can be used to load the coordinates of a point in an Object instance. It should be used in cunjunction with WritePosition() which executes the inverse operation. If id is NULL, a position with no id property will be search and parsed.
bool gcu::ReadRadius | ( | xmlNodePtr | node, |
GcuAtomicRadius & | radius | ||
) |
node,: | a pointer to the xmlNode representing an Object instance. |
radius,: | a GcuAtomicRadius structure. |
This function parses the XML node representing a radius (written using WriteRadius()) and fills the fields in the GcuAtomicRadius structure with the data parsed.
bool gcu::WriteColor | ( | xmlDocPtr | xml, |
xmlNodePtr | node, | ||
const char * | id, | ||
double | red, | ||
double | green, | ||
double | blue, | ||
double | alpha = 1.0 |
||
) |
xml,: | a pointer to the xmlDoc used to serialize the document. |
node,: | a pointer to the xmlNode representing an Object instance. |
id,: | the value of the id property of the color. This is used for Object instances having at least two colors. of the arrow are positions. |
red,: | the red component of the color. |
green,: | the green component of the color. |
blue,: | the blue component of the color. |
alpha,: | the alpha component of the color. |
Save a color as an XML node added to the children of node. This color can then be parsed using ReadColor().
void gcu::WriteColor | ( | xmlNodePtr | node, |
GOColor | color | ||
) |
node,: | a pointer to the xmlNode to which the color must be serialized. |
color,: | a pointer to the xmlNode from which the color must be retrieved. Serializes color to node. |
void gcu::WriteDate | ( | xmlNodePtr | node, |
char const * | name, | ||
GDate const * | date | ||
) |
node | a pointer to an XML node. |
name | the property name. |
date | the date to serialize. |
Adds date as a property with name name to node. This method is locale independent. The date will be stored in the format MM/DD/YYYY.
void gcu::WriteFloat | ( | xmlNodePtr | node, |
char const * | name, | ||
double | value | ||
) |
node | a pointer to an XML node. |
name | the property name. |
value | the value for the property. |
Adds value as a property with name name to node. This method is locale independent.
void gcu::WriteInt | ( | xmlNodePtr | node, |
char const * | name, | ||
int | value | ||
) |
node | a pointer to an XML node. |
name | the property name. |
value | the value for the property. |
Adds value as a property with name name to node.
bool gcu::WritePosition | ( | xmlDocPtr | xml, |
xmlNodePtr | node, | ||
const char * | id, | ||
double | x, | ||
double | y, | ||
double | z = 0.0 |
||
) |
WritePosition
xml,: | a pointer to the xmlDoc used to serialize the document. |
node,: | a pointer to the xmlNode representing an Object instance. |
id,: | the value of the id property of the position. This is used for example for arrows because both the head and the tail of the arrow are positions. |
x,: | the x coordinate of the position. |
y,: | the y coordinate of the position. |
z,: | the z coordinate of the position. |
Save a position as an XML node added to the children of node. This position can then be parsed using ReadPosition().
bool gcu::WriteRadius | ( | xmlDocPtr | xml, |
xmlNodePtr | node, | ||
const GcuAtomicRadius & | radius | ||
) |
xml,: | a pointer to the xmlDoc used to serialize the document. |
node,: | a pointer to the xmlNode representing an Object instance. |
radius,: | a GcuAtomicRadius structure. |
Save a radius as an XML node added to the children of node. This radius can then be parsed using ReadRadius().