#include <generic_graph.hxx>


Public Member Functions | |
| void | add () const |
The C++ classes of gvertex and gedge are use counted in the same way that laws are use counted. | |
| void | clear_kind () |
Sets the user-defined kind array for this graph item to NULL. | |
| virtual ENTITY * | get_entity () const |
| This returns a pointer to the entity that the graph vertex refers to. | |
| int | get_kind_size () const |
Returns the size of the kind array. | |
| gvertex (char const *name=NULL) | |
| Creates an instance of a graph vertex and supplies it with a name. | |
| logical | is_kind (int which) const |
Determines whether or not this graph vertex is of the specified kind. | |
| char const * | name () const |
| Every graph vertices can be supplied a character string as a name. | |
| logical | operator!= (gvertex const &in_vertex) const |
| Determines whether or not the supplied vertex is not equal to this graph vertex. | |
| logical | operator== (gvertex const &in_vertex) const |
| Determines whether or not the supplied vertex is equal to this graph vertex. | |
| void | remove () |
The C++ classes of gvertex and gedge are use counted in the same way that laws are use counted. | |
| void | set_kind (int which, logical value) |
Assigns a user-defined kind to this graph edge. | |
Role: The concepts of vertex, edge, and graph have been implemented as the C++ classes gvertex, gedge, and generic_graph. (entity_gvertex is derived from gvertex except that it contains a pointer to an entity in the model. Such an entity could be a cell or a face.) A gvertex may be created with an optional char *name. A gedge may be created with two gvertex pointers. An empty graph may be created and edges and vertices may be added to it by calling its add_vertex and add_edge methods. Once created, a graph may be interrogated, ordered, or subsetted in a number of ways.
The C++ classes of gvertex and gedge are use counted in the same way that laws are use counted. That is to say that the are copied by calling the add method and deleted by calling the remove method.
To make a gvertex or gedge contain data, derive a class from the base classes of gvertex and gedge. Use a technique similar to the entity_gvertex class which enables it to contain an entity pointer.
| gvertex::gvertex | ( | char const * | name = NULL |
) |
Creates an instance of a graph vertex and supplies it with a name.
| name | name of vertex |
| void gvertex::add | ( | ) | const |
| void gvertex::clear_kind | ( | ) |
Sets the user-defined kind array for this graph item to NULL.
kind is actually a dynamic array.
Role: The value argument specifies whether or not this graph edge is of the kind number specified.
| virtual ENTITY* gvertex::get_entity | ( | ) | const [virtual] |
This returns a pointer to the entity that the graph vertex refers to.
Role: Initially, this can be a CELL or a FACE.
Reimplemented in entity_gvertex.
| int gvertex::get_kind_size | ( | ) | const |
Returns the size of the kind array.
| logical gvertex::is_kind | ( | int | which | ) | const |
Determines whether or not this graph vertex is of the specified kind.
| which | kind to test. |
| char const* gvertex::name | ( | ) | const |
Every graph vertices can be supplied a character string as a name.
Role: This method returns its name.
| logical gvertex::operator!= | ( | gvertex const & | in_vertex | ) | const |
Determines whether or not the supplied vertex is not equal to this graph vertex.
| in_vertex | gvertex. |
| logical gvertex::operator== | ( | gvertex const & | in_vertex | ) | const |
Determines whether or not the supplied vertex is equal to this graph vertex.
| in_vertex | supplied vertex. |
| void gvertex::remove | ( | ) |
| void gvertex::set_kind | ( | int | which, | |
| logical | value | |||
| ) |
Assigns a user-defined kind to this graph edge.
kind is actually a dynamic array.
Role: The value argument specifies whether or not this graph edge is of the kind number specified.
| which | kind of use. | |
| value | turn on or off. |