9 #ifndef CMZN_REGION_HPP__
10 #define CMZN_REGION_HPP__
12 #include "zinc/region.h"
13 #include "zinc/context.hpp"
22 class StreaminformationRegion;
44 explicit Region(cmzn_region_id in_region_id) : id(in_region_id)
47 Region(
const Region& region) : id(cmzn_region_access(region.id))
52 cmzn_region_id temp_id = cmzn_region_access(region.id);
55 cmzn_region_destroy(&
id);
65 cmzn_region_destroy(&
id);
104 return cmzn_region_begin_change(
id);
119 return cmzn_region_end_change(
id);
134 return cmzn_region_begin_hierarchical_change(
id);
149 return cmzn_region_end_hierarchical_change(
id);
162 return Region(cmzn_region_create_child(
id, name));
176 return Region(cmzn_region_create_subregion(
id, path));
188 return Region(cmzn_region_create_region(
id));
209 return cmzn_region_read_file(
id, fileName);
220 return cmzn_region_get_name(
id);
233 return cmzn_region_set_name(
id, name);
243 return Region(cmzn_region_get_parent(
id));
253 return Region(cmzn_region_get_first_child(
id));
263 return Region(cmzn_region_get_next_sibling(
id));
273 return Region(cmzn_region_get_previous_sibling(
id));
288 return cmzn_region_append_child(
id, newChild.id);
304 return cmzn_region_insert_child_before(
id, newChild.id, refChild.id);
316 return cmzn_region_remove_child(
id, oldChild.id);
327 return Region(cmzn_region_find_child_by_name(
id, name));
342 return Region(cmzn_region_find_subregion_at_path(
id, path));
353 return cmzn_region_contains_subregion(
id, subregion.id);
366 return cmzn_region_write_file(
id, fileName);
411 inline bool operator==(
const Region& a,
const Region& b)
413 return a.getId() == b.getId();
418 return Region(cmzn_context_get_default_region(
id));
423 return Region(cmzn_context_create_region(
id));
int setName(const char *name)
Definition: region.hpp:231
Region findSubregionAtPath(const char *path)
Definition: region.hpp:340
int writeFile(const char *fileName)
Definition: region.hpp:364
Container/manager for graphics visualising a region.
Definition: scene.hpp:34
bool isValid() const
Definition: region.hpp:74
Fieldmodule getFieldmodule() const
Definition: fieldmodule.hpp:1567
Region createSubregion(const char *path)
Definition: region.hpp:174
int appendChild(Region newChild)
Definition: region.hpp:286
Region getPreviousSibling()
Definition: region.hpp:271
Region createChild(const char *name)
Definition: region.hpp:160
A hierarchical block/namespace owning domains and fields.
Definition: region.hpp:33
Region findChildByName(const char *name)
Definition: region.hpp:325
cmzn_region_id getId() const
Definition: region.hpp:84
int removeChild(const Region &oldChild)
Definition: region.hpp:314
bool containsSubregion(const Region &subregion)
Definition: region.hpp:351
StreaminformationRegion createStreaminformationRegion()
Definition: streamregion.hpp:190
int beginHierarchicalChange()
Definition: region.hpp:132
Region getDefaultRegion()
Definition: region.hpp:416
int write(const StreaminformationRegion &streaminformationRegion)
Definition: streamregion.hpp:201
Region getParent()
Definition: region.hpp:241
int insertChildBefore(const Region &newChild, const Region &refChild)
Definition: region.hpp:302
int endHierarchicalChange()
Definition: region.hpp:147
int endChange()
Definition: region.hpp:117
Region getFirstChild()
Definition: region.hpp:251
Scene getScene()
Definition: scene.hpp:512
Container/manager of fields and domains within a region.
Definition: fieldmodule.hpp:126
int beginChange()
Definition: region.hpp:102
int readFile(const char *fileName)
Definition: region.hpp:207
int read(const StreaminformationRegion &streaminformationRegion)
Definition: streamregion.hpp:196
Region createRegion()
Definition: region.hpp:186
Region createRegion()
Definition: region.hpp:421
char * getName()
Definition: region.hpp:218
Region getNextSibling()
Definition: region.hpp:261