OpenCMISS-Zinc C++ API Documentation
|
A hierarchical block/namespace owning domains and fields. More...
#include <region.hpp>
Public Member Functions | |
Region (cmzn_region_id in_region_id) | |
Region (const Region ®ion) | |
Region & | operator= (const Region ®ion) |
bool | isValid () const |
cmzn_region_id | getId () const |
int | beginChange () |
int | endChange () |
int | beginHierarchicalChange () |
int | endHierarchicalChange () |
Region | createChild (const char *name) |
Region | createSubregion (const char *path) |
Region | createRegion () |
Fieldmodule | getFieldmodule () const |
int | readFile (const char *fileName) |
char * | getName () |
int | setName (const char *name) |
Region | getParent () |
Region | getFirstChild () |
Region | getNextSibling () |
Region | getPreviousSibling () |
int | appendChild (Region newChild) |
int | insertChildBefore (const Region &newChild, const Region &refChild) |
int | removeChild (const Region &oldChild) |
Region | findChildByName (const char *name) |
Region | findSubregionAtPath (const char *path) |
bool | containsSubregion (const Region &subregion) |
int | writeFile (const char *fileName) |
Scene | getScene () |
StreaminformationRegion | createStreaminformationRegion () |
int | read (const StreaminformationRegion &streaminformationRegion) |
int | write (const StreaminformationRegion &streaminformationRegion) |
Protected Attributes | |
cmzn_region_id | id |
A hierarchical block/namespace owning domains and fields.
A region represents a block of a hierarchical model. It owns a local set of domains and fields describing the model (each accessed from its fieldmodule), and a scene for building graphics to visualise the model. Each region has any number of uniquely named child regions, allowing tree-like models to be constructed.
|
inline |
Adds new_child to the end of the list of child regions of this region. If the new_child is already in the region tree, it is first removed. Fails if new_child contains this region. Fails if new_child is unnamed or the name is already used by another child of this region.
newChild | The child to add. |
|
inline |
Begin caching or increment cache level for this region only. Call this function before making multiple changes to the region or its fields and objects via its field_module to minimise number of change messages sent to clients. Must call region end change method after making changes. Important: Do not pair with region end hierarchical change method! Note: region change caching encompasses field_module change caching so there is no need to call fieldmodule begin/end change methods as well. Can be nested.
|
inline |
Begin caching or increment cache level for all regions in a tree, used to efficiently and safely make hierarchical field changes or modify the tree. Must call region end hierarchical_change method after modifications made. Can be nested. Important: Do not pair with non-hierarchical region end change method!
|
inline |
Returns true if region is or contains the subregion.
subregion | The region being tested for containment. |
|
inline |
Create a child region with provided name in parent region. Fails if a child of that name exists already.
name | The name for the new region. |
|
inline |
Creates and returns a reference to a region compatible with base_region, i.e. able to exist in the same region tree.
|
inline |
Creates a stream information object for specifying files/resources and options for reading and writing field data to/from this region and child regions.
|
inline |
Create a region at the specified relative path, creating any intermediary regions if required. Fails if a subregion exists at that path already.
path | Region path, a series of valid region names separated by a forward slash "/". Leading and trailing separator slashes are optional. |
|
inline |
Decrement cache level or end caching of changes for this region only. Call region begin change method before making multiple field or region changes and call this afterwards. When change level is restored to zero in region, cached change messages are sent out to clients. Important: Do not pair with region begin hierarchical change method!
|
inline |
Decrement cache level or end caching of changes for all regions in a tree. Call region begin hierarchical change method before making hierarchical field changes or modifying the region tree, and call this afterwards. When change level is restored to zero in any region, cached change messages are sent out. Important: Do not pair with non-hierarchical region begin change method!
|
inline |
Finds child region with supplied name, if any.
name | The name of the child. |
|
inline |
Returns a handle to the subregion at the path relative to this region. The format of the path string is CHILD_NAME/CHILD_NAME/... i.e. forward slash characters '/' are used as parent/child name separators. Single leading and trailing separator characters are ignored. Hence, both name="" and name="/" find the region itself.
path | The directory-style path to the subregion. |
|
inline |
Get field module which manages this region's fields, which must be passed to field factory create methods.
|
inline |
Returns a handle to the first child region of this region.
|
inline |
|
inline |
Returns the name of the region.
|
inline |
Returns a reference to this region's next sibling region.
|
inline |
Returns a handle to the parent region of this region.
|
inline |
Returns a reference to this region's previous sibling region.
|
inline |
Return handle to the scene for this region, which contains graphics for visualising fields in the region.
cmiss_region | The region of query. |
|
inline |
Inserts new_child before the existing ref_child in the list of child regions of this region. If ref_child is NULL new_child is added at the end of the list. If the new_child is already in the region tree, it is first removed. Fails if new_child contains this region. Fails if new_child is unnamed or the name is already used by another child of this region.
newChild | The child to append. |
|
inline |
Check if this is a valid Region object.
|
inline |
Reads region data using stream resource objects provided in the stream information object.
streaminformationRegion | Handle to the stream information region containing information about resources to read from. |
|
inline |
Convenient function to read a file with the provided name into a region directly.
fileName | name of the file to read from. |
|
inline |
Removes old_child from the list of child regions of this region. Fails if old_child is not a child of this region.
oldChild | The child to remove. |
|
inline |
Sets the name of the region. Any name is valid as long as it is unique in the parent region, however use of forward slash characters '/' in names is discouraged since it prevent regions being found by paths.
name | The new name for the region. |
|
inline |
Writes region data to stream resource objects described in the stream information object.
streaminformationRegion | Handle to the stream information region containing information about resources to write to. |
|
inline |
Convenient function to write the region into a file with the provided name.
fileName | name of the file to write to.. |