PLaSK library
|
Base class for all geometries. More...
#include <plask/geometry/object.hpp>
Classes | |
struct | Changer |
Base class for geometry changers. More... | |
struct | ChildrenListChangedEvent |
Event class for events types: EVENT_CHILDREN_INSERT and EVENT_CHILDREN_REMOVE. More... | |
struct | CompositeChanger |
Geometry changer which holds vector of changers and try to apply this changers sequentially. More... | |
struct | DeleteChanger |
class | Event |
Store information about event connected with geometry object. More... | |
struct | PredicateHasRole |
Predicate which check if given object belong to class with given name. More... | |
struct | PredicateIsA |
Predicate which check if given object is another instance of some particular object (given in constructor). More... | |
struct | ReplaceChanger |
Changer which replaces given geometry object from to given geometry object to. More... | |
struct | Subtree |
This structure can refer to part of geometry tree. More... | |
struct | ToBlockChanger |
Changer which replaces given geometry object toChange to block (2d or 3d, depents from toChange) with size equals to toChange bounding box, and with given material. More... | |
class | WriteXMLCallback |
Base class for callbacks used by save() method to get names of objects and paths. More... | |
Public Types | |
enum | Type { TYPE_LEAF = 0 , TYPE_TRANSFORM = 1 , TYPE_SPACE_CHANGER = 2 , TYPE_CONTAINER = 3 , TYPE_GEOMETRY = 4 , TYPE_SEPARATOR = 5 } |
Type of geometry object. More... | |
typedef std::function< bool(const GeometryObject &)> | Predicate |
Predicate on GeometryObject. | |
Public Member Functions | |
void | setMaxSteps (unsigned value) |
Set max_steps. | |
void | setMinStepSize (double value) |
Set min_step_size. | |
template<typename ClassT , typename methodT > | |
boost::signals2::connection | changedConnectMethod (ClassT *obj, methodT method, boost::signals2::connect_position at=boost::signals2::at_back) |
Connect a method to changed signal. | |
template<typename ClassT , typename methodT > | |
void | changedDisconnectMethod (ClassT *obj, methodT method) |
Disconnect a method from changed signal. | |
template<typename EventT = Event, typename... Args> | |
void | fireChanged (Args &&... event_constructor_params_without_source) |
Call changed with this as event source. | |
GeometryObject (const GeometryObject &to_copy) | |
Initialize this to be the same as to_copy but doesn't have any changes observer. | |
GeometryObject & | operator= (const GeometryObject &to_copy) |
Set this to be the same as to_copy but doesn't change changes observer. | |
GeometryObject () | |
GeometryObject (unsigned max_steps, double min_step_size) | |
virtual | ~GeometryObject () |
Virtual destructor. | |
virtual std::string | getTypeName () const =0 |
Get name of object type (like: "block2d", "shelf", "stack3d", etc.). | |
virtual void | writeXML (XMLWriter::Element &parent_xml_object, WriteXMLCallback &write_cb, AxisNames parent_axes) const |
Write geometry tree branch rooted by this to XML. | |
void | writeXML (XMLWriter::Element &parent_xml_object, WriteXMLCallback &write_cb) const |
Write geometry tree branch rooted by this to XML. | |
void | writeXML (XMLWriter::Element &parent_xml_object) const |
Write geometry tree branch rooted by this to XML. | |
template<int DIMS> | |
shared_ptr< GeometryObjectD< DIMS > > | asD () |
Cast this to GeometryObjectD<DIMS>. | |
template<int DIMS> | |
shared_ptr< const GeometryObjectD< DIMS > > | asD () const |
Cast this to GeometryObjectD<DIMS> (const version). | |
shared_ptr< Geometry > | asGeometry () |
Cast this to Geometry. | |
shared_ptr< const Geometry > | asGeometry () const |
Cast this to Geometry. | |
virtual Type | getType () const =0 |
Check if geometry is: leaf, transform or container type object. | |
bool | isLeaf () const |
bool | isTransform () const |
bool | isSpaceChanger () const |
bool | isContainer () const |
bool | isGeometry () const |
virtual void | addPointsAlongToSet (std::set< double > &points, Primitive< 3 >::Direction PLASK_UNUSED(direction), unsigned PLASK_UNUSED(max_steps), double PLASK_UNUSED(min_step_size)) const =0 |
Add characteristic points information along specified axis to set. | |
std::set< double > | getPointsAlong (Primitive< 3 >::Direction direction, unsigned max_steps=PLASK_GEOMETRY_MAX_STEPS, double min_step_size=PLASK_GEOMETRY_MIN_STEP_SIZE) const |
Get characteristic points information along specified axis. | |
bool | hasRole (std::string role_name) const |
Check if this object belongs to class (has tag) with name role_name . | |
void | addRole (std::string role_name) |
Add this to given class. | |
void | removeRole (std::string role_name) |
Remove this from given class, do nothing if this is not in given class. | |
void | clearRoles () |
Clear set of roles of this. | |
virtual int | getDimensionsCount () const =0 |
Get number of dimensions. | |
virtual void | validate () const |
Check if object is ready for calculation. | |
virtual bool | hasInSubtree (const GeometryObject &el) const |
Check if el is in subtree with this in root. | |
bool | hasInSubtree (const GeometryObject &el, const PathHints *pathHints) const |
bool | hasInSubtree (shared_ptr< const GeometryObject > el, const PathHints *pathHints) const |
virtual Subtree | getPathsTo (const GeometryObject &el, const PathHints *pathHints=0) const =0 |
Find paths to el. | |
virtual void | getObjectsToVec (const Predicate &predicate, std::vector< shared_ptr< const GeometryObject > > &dest, const PathHints *path=0) const =0 |
Append all objects from subtree with this in root, which fulfill predicate to vector dest . | |
void | getObjectsToVec (const Predicate &predicate, std::vector< shared_ptr< const GeometryObject > > &dest, const PathHints &path) const |
Append all objects from subtree with this in root, which fulfill predicate to vector dest . | |
std::vector< shared_ptr< const GeometryObject > > | getObjects (const Predicate &predicate, const PathHints *path=0) const |
Get vector of all objects from subtree with this in root, which fulfill predicate. | |
std::vector< shared_ptr< const GeometryObject > > | getObjects (const Predicate &predicate, const PathHints &path) const |
Get vector of all objects from subtree with this in root, which fulfill predicate. | |
void | getLeafsToVec (std::vector< shared_ptr< const GeometryObject > > &dest, const PathHints *path=0) const |
Append all leafs in subtree with this in root to vector dest . | |
void | getLeafsToVec (std::vector< shared_ptr< const GeometryObject > > &dest, const PathHints &path) const |
Append all leafs in subtree with this in root to vector dest . | |
std::vector< shared_ptr< const GeometryObject > > | getLeafs (const PathHints *path=0) const |
Get all leafs in subtree with this object as root. | |
std::vector< shared_ptr< const GeometryObject > > | getLeafs (const PathHints &path) const |
Get all leafs in subtree with this object as root. | |
void | getObjectsWithRoleToVec (const std::string &role, std::vector< shared_ptr< const GeometryObject > > &dest) const |
Append all objects with a specified role in subtree with this in root to vector dest . | |
std::vector< shared_ptr< const GeometryObject > > | getObjectsWithRole (const std::string &role) const |
Get all objects with a specified role in subtree with this object as root. | |
virtual std::size_t | getChildrenCount () const =0 |
Get number of all children of this in geometry graph. | |
virtual shared_ptr< GeometryObject > | getChildNo (std::size_t child_no) const =0 |
Get child with given index. | |
virtual std::size_t | getRealChildrenCount () const |
Get number of real (physically stored) children in geometry graph. | |
virtual shared_ptr< GeometryObject > | getRealChildNo (std::size_t child_no) const |
Get real (physically stored) child with given index. | |
virtual void | removeAtUnsafe (std::size_t index) |
Remove child at given index . | |
void | removeAt (std::size_t index) |
Remove child at given index . | |
void | removeRangeUnsafe (std::size_t index_begin, std::size_t index_end) |
bool | removeRange (std::size_t index_begin, std::size_t index_end) |
Remove all children in given range [index_begin, index_end). | |
virtual void | forEachRealObjectInSubtree (std::function< bool(const GeometryObject &)> callback) const |
Call a callback for each object in subtree with this in root. | |
FunctorIndexedIterator< ChildGetter > | begin () const |
FunctorIndexedIterator< ChildGetter > | end () const |
virtual shared_ptr< const GeometryObject > | changedVersion (const Changer &changer, Vec< 3, double > *translation=0) const =0 |
Get this or copy of this with some changes in subtree. | |
virtual shared_ptr< GeometryObject > | shallowCopy () const =0 |
Get shallow copy of this. | |
virtual shared_ptr< GeometryObject > | deepCopy (std::map< const GeometryObject *, shared_ptr< GeometryObject > > &copied) const =0 |
Get deep copy of this. | |
shared_ptr< GeometryObject > | deepCopy () |
Get deep copy of this. | |
bool | canHasAsChild (const GeometryObject &potential_child) const |
bool | canHasAsParent (const GeometryObject &potential_parent) const |
void | ensureCanHasAsParent (const GeometryObject &potential_parent) const |
Throw CyclicReferenceException if potential_parent is in subtree with this in root. | |
void | ensureCanHaveAsChild (const GeometryObject &potential_child) const |
Throw CyclicReferenceException if potential_child has this in subtree. | |
Static Public Member Functions | |
static bool | PredicateIsLeaf (const GeometryObject &el) |
Predicate which check if given object is leaf. | |
Public Attributes | |
unsigned | max_steps |
Maximum number of points to split a single leaf. | |
double | min_step_size |
Minimum distance between divisions for a single leaf. | |
std::set< std::string > | roles |
Roles/tags. | |
boost::signals2::signal< void(Event &)> | changed |
Changed signal, fired when object was changed. | |
Protected Member Functions | |
virtual void | writeXMLAttr (XMLWriter::Element &dest_xml_object, const AxisNames &axes) const |
Append XML attributes of this to dest_xml_object . | |
virtual void | writeXMLChildren (XMLWriter::Element &dest_xml_object, WriteXMLCallback &write_cb, const AxisNames &axes) const |
Append all children of this to XML dest_xml_object . | |
void | ensureIsValidChildNr (std::size_t child_no, const char *method_name="getChildNo", const char *arg_name="child_no") const |
Check if given index is valid child index and throw exception of it is not. | |
void | ensureIsValidInsertPosition (std::size_t child_no, const char *method_name="insert", const char *arg_name="pos") const |
Check if given index is valid insert index and throw exception of it is not. | |
void | fireChildrenChanged () |
Inform observers that children list was changed (also that this is resized) | |
void | fireChildrenRemoved (std::size_t beginIndex, std::size_t endIndex) |
void | fireChildrenInserted (std::size_t beginIndex, std::size_t endIndex) |
Base class for all geometries.
Definition at line 80 of file object.hpp.
typedef std::function<bool(const GeometryObject&)> plask::GeometryObject::Predicate |
Predicate on GeometryObject.
Definition at line 433 of file object.hpp.
Type of geometry object.
Definition at line 82 of file object.hpp.
|
inline |
Initialize this to be the same as to_copy
but doesn't have any changes observer.
to_copy | object to copy |
Definition at line 614 of file object.hpp.
|
inline |
Definition at line 630 of file object.hpp.
Definition at line 632 of file object.hpp.
|
virtual |
|
pure virtual |
Add characteristic points information along specified axis to set.
[in,out] | points | ordered set of division points along specified axis |
direction | axis direction | |
max_steps | maximum number of points to split single leaf | |
min_step_size | minimum distance between divisions for a single leaf |
|
inline |
Add this to given class.
role_name | name of class where this should be added |
Definition at line 767 of file object.hpp.
template shared_ptr< GeometryObjectD< 3 > > plask::GeometryObject::asD< 3 > | ( | ) |
Cast this to GeometryObjectD<DIMS>.
Definition at line 125 of file object.cpp.
template shared_ptr< const GeometryObjectD< 3 > > plask::GeometryObject::asD< 3 > | ( | ) | const |
Cast this to GeometryObjectD<DIMS> (const version).
Definition at line 131 of file object.cpp.
shared_ptr< Geometry > plask::GeometryObject::asGeometry | ( | ) |
Cast this to Geometry.
Definition at line 141 of file object.cpp.
Cast this to Geometry.
Definition at line 145 of file object.cpp.
|
inline |
Definition at line 1013 of file object.hpp.
|
inline |
Definition at line 1056 of file object.hpp.
|
inline |
Definition at line 1058 of file object.hpp.
|
inline |
Connect a method to changed signal.
obj,method | slot to connect, object and it's method |
at | specifies where the slot should be connected:
|
Definition at line 580 of file object.hpp.
Disconnect a method from changed signal.
Definition at line 587 of file object.hpp.
|
pure virtual |
Get this or copy of this with some changes in subtree.
[in] | changer | changer which will be applied to subtree with this in root |
[out] | translation | optional, if non-null, recommended translation of this after change will be stored |
Implemented in plask::Geometry2DCartesian, plask::Geometry2DCylindrical, plask::Geometry3D, plask::GeometryObjectContainer< dim >, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::GeometryObjectSeparator< dim >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >, plask::Translation< dim >, and plask::Translation< DIMS >.
|
inline |
Clear set of roles of this.
Definition at line 784 of file object.hpp.
|
inline |
Get deep copy of this.
In the deep copy all children are copied.
Definition at line 1051 of file object.hpp.
|
pure virtual |
Get deep copy of this.
In the deep copy all children are copied.
copied | map containing copied objects to avoid double copying |
Implemented in plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::GeometryObjectSeparator< dim >, plask::Geometry2DCartesian, plask::Geometry2DCylindrical, plask::Geometry3D, plask::ShelfContainer2D, plask::StackContainer< dim >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >, and plask::TranslationContainer< dim >.
|
inline |
Definition at line 1018 of file object.hpp.
void plask::GeometryObject::ensureCanHasAsParent | ( | const GeometryObject & | potential_parent | ) | const |
Throw CyclicReferenceException if potential_parent
is in subtree with this in root.
[in] | potential_parent | potential, new parent of this |
Definition at line 192 of file object.cpp.
|
inline |
Throw CyclicReferenceException if potential_child
has this in subtree.
[in] | potential_child | potential, new child of this |
Definition at line 1070 of file object.hpp.
|
inlineprotected |
Check if given index
is valid child index and throw exception of it is not.
child_no | index to check |
method_name | caller method name which is used to format exception message |
arg_name | name of index argument in caller method, used to format exception message |
OutOfBoundsException | if index is not valid |
Definition at line 1101 of file object.hpp.
|
inlineprotected |
Check if given index
is valid insert index and throw exception of it is not.
child_no | index to check |
method_name | caller method name which is used to format exception message |
arg_name | name of index argument in caller method, used to format exception message |
OutOfBoundsException | if index is not valid |
Definition at line 1116 of file object.hpp.
|
inline |
Call changed with this as event source.
event_constructor_params_without_source | parameters for event constructor (without first - source) |
Definition at line 605 of file object.hpp.
|
inlineprotected |
Inform observers that children list was changed (also that this is resized)
Definition at line 1125 of file object.hpp.
|
inlineprotected |
Definition at line 1134 of file object.hpp.
|
inlineprotected |
Definition at line 1129 of file object.hpp.
|
virtual |
Call a callback
for each object in subtree with this
in root.
Visit tree in pre-order.
callback | call-back to call, should return true only if descendants of object given as parameter should be visited |
Definition at line 219 of file object.cpp.
|
pure virtual |
Get child with given index.
child_no | index of child to get |
child_no
Implemented in plask::GeometryObjectContainer< dim >, plask::ArrangeContainer< dim >, plask::Lattice, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::Mirror< dim >, plask::GeometryObjectSeparator< dim >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, and plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >.
|
pure virtual |
Get number of all children of this in geometry graph.
Implemented in plask::GeometryObjectContainer< dim >, plask::ArrangeContainer< dim >, plask::Lattice, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::Mirror< dim >, plask::GeometryObjectSeparator< dim >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, and plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >.
Get number of dimensions.
Implemented in plask::GeometryObjectD< dim >, plask::GeometryObjectD< 3 >, plask::GeometryObjectD< dims >, plask::GeometryObjectD< SpaceType::DIM >, plask::GeometryD< dim >, plask::GeometryD< 2 >, and plask::GeometryD< 3 >.
|
inline |
Get all leafs in subtree with this object as root.
path | path hints which limits search space |
Definition at line 905 of file object.hpp.
|
inline |
Get all leafs in subtree with this object as root.
path | (optional) path hints which limits search space |
Definition at line 894 of file object.hpp.
|
inline |
Append all leafs in subtree with this in root to vector dest
.
dest | leafs destination vector |
path | path hints which limits search space |
Definition at line 885 of file object.hpp.
|
inline |
Append all leafs in subtree with this in root to vector dest
.
dest | leafs destination vector |
path | (optional) path hints which limits search space |
Definition at line 876 of file object.hpp.
|
inline |
Get vector of all objects from subtree with this in root, which fulfill predicate.
predicate | predicate required to match |
path | path hints which limits search space |
Definition at line 867 of file object.hpp.
|
inline |
Get vector of all objects from subtree with this in root, which fulfill predicate.
predicate | predicate required to match |
path | (optional) path hints which limits search space |
Definition at line 854 of file object.hpp.
|
inline |
Append all objects from subtree with this in root, which fulfill predicate to vector dest
.
predicate | predicate required to match |
dest | destination vector |
path | path hints which limits search space |
Definition at line 842 of file object.hpp.
|
pure virtual |
Append all objects from subtree with this in root, which fulfill predicate to vector dest
.
predicate | predicate required to match |
dest | destination vector |
path | (optional) path hints which limits search space |
Implemented in plask::GeometryObjectContainer< dim >, plask::ArrangeContainer< dim >, plask::Lattice, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::Mirror< dim >, plask::GeometryObjectSeparator< dim >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >, plask::GeometryD< dim >, plask::GeometryD< 2 >, and plask::GeometryD< 3 >.
|
inline |
Get all objects with a specified role in subtree with this object as root.
role | role to search objects with |
Definition at line 921 of file object.hpp.
|
inline |
Append all objects with a specified role in subtree with this in root to vector dest
.
dest | objects destination vector |
role | role to search objects with |
Definition at line 912 of file object.hpp.
|
pure virtual |
Find paths to el.
el | object to search for |
pathHints | (optional) path hints which limits search space |
el
is in all leafs), empty sub-tree if el
is not in subtree with this
in root Implemented in plask::GeometryObjectContainer< dim >, plask::Lattice, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::Mirror< dim >, plask::GeometryObjectSeparator< dim >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >, plask::GeometryObjectD< 3 >, plask::GeometryObjectD< dims >, plask::GeometryObjectD< SpaceType::DIM >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, and plask::GeometryObjectD< dim >.
|
inline |
Get characteristic points information along specified axis.
direction | axis direction |
max_steps | maximum number of points to split single leaf |
min_step_size | minimum distance between divisions for a single leaf |
Definition at line 745 of file object.hpp.
|
virtual |
Get real (physically stored) child with given index.
By default call getChildNo(child_no), but objects of some types (like multi-stack) redefine this.
child_no | index of real child to get |
child_no
Reimplemented in plask::ArrangeContainer< dim >, plask::Lattice, and plask::Mirror< dim >.
Definition at line 211 of file object.cpp.
|
virtual |
Get number of real (physically stored) children in geometry graph.
By default call getChildrenCount(), but objects of some types (like multi-stack) redefine this.
Reimplemented in plask::ArrangeContainer< dim >, plask::Lattice, and plask::Mirror< dim >.
Definition at line 207 of file object.cpp.
Check if geometry is: leaf, transform or container type object.
Implemented in plask::GeometryObjectContainer< dim >, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::GeometryObjectSeparator< dim >, plask::Geometry, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >, plask::GeometryObjectTransformSpace< this_dim, child_dim, ChildType >, and plask::GeometryObjectTransformSpace< 3, 2 >.
|
pure virtual |
Get name of object type (like: "block2d", "shelf", "stack3d", etc.).
This name is used as tag name when object is serialized to XML.
Implemented in plask::Circle< dim >, plask::Clip< dim >, plask::RotatedCuboid, plask::Cylinder, plask::HollowCylinder, plask::Intersection< dim >, plask::ArrangeContainer< dim >, plask::Lattice, plask::Block< dim >, plask::Block< 3 >, plask::Flip< dim >, plask::Mirror< dim >, plask::Polygon, plask::TriangularPrism, plask::Prism, plask::GeometryObjectSeparator< dim >, plask::Gap1D< dim, direction >, plask::Geometry2DCartesian, plask::Geometry2DCylindrical, plask::Geometry3D, plask::ShelfContainer2D, plask::StackContainer< dim >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Extrusion, plask::Revolution, plask::TranslationContainer< dim >, and plask::Triangle.
|
virtual |
Check if el is in subtree with this
in root.
el | object to search for |
true
only if el is in subtree with this
in root Reimplemented in plask::GeometryObjectContainer< dim >, plask::GeometryObjectLeaf< dim >, plask::GeometryObjectLeaf< 2 >, plask::GeometryObjectLeaf< 3 >, plask::GeometryObjectSeparator< dim >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, and plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >.
Definition at line 149 of file object.cpp.
|
inline |
Definition at line 808 of file object.hpp.
|
inline |
Definition at line 812 of file object.hpp.
|
inline |
Check if this object belongs to class (has tag) with name role_name
.
role_name | name of class/tag to check |
true
only if this belongs to class role_name
Definition at line 758 of file object.hpp.
|
inline |
Definition at line 715 of file object.hpp.
|
inline |
Definition at line 716 of file object.hpp.
|
inline |
Definition at line 712 of file object.hpp.
|
inline |
Definition at line 714 of file object.hpp.
|
inline |
Definition at line 713 of file object.hpp.
|
inline |
Set this to be the same as to_copy
but doesn't change changes observer.
to_copy | object to copy |
Definition at line 623 of file object.hpp.
|
inlinestatic |
Predicate which check if given object is leaf.
Definition at line 436 of file object.hpp.
|
inline |
Remove child at given index
.
Throw exception if given index
is not valid, real child index.
index | index of real child to remove |
Definition at line 972 of file object.hpp.
|
virtual |
Remove child at given index
.
This is unsafe but fast version, it doesn't check index and doesn't call fireChildrenChanged() to inform listeners about this object changes. Caller should do this manually or call removeAt(std::size_t) instead.
Default implementation throw exception but this method is overwritten in subroles.
index | index of real child to remove |
Reimplemented in plask::GeometryObjectContainer< dim >, plask::WithAligners< GeometryObjectContainer< dim >, align::AlignerD< dim > >, plask::WithAligners< StackContainerBaseImpl< dim >, StackContainerChildAligner< dim > >, plask::StackContainerBaseImpl< dim, growingDirection >, plask::StackContainerBaseImpl< 2, Primitive< 2 >::DIRECTION_TRAN >, plask::StackContainer< dim >, plask::TranslationContainer< dim >, plask::Geometry2DCartesian, plask::Geometry2DCylindrical, plask::Geometry3D, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, and plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >.
Definition at line 215 of file object.cpp.
|
inline |
Remove all children in given range [index_begin, index_end).
index_begin,index_end | range of real children's indexes |
Definition at line 987 of file object.hpp.
|
inline |
Definition at line 978 of file object.hpp.
|
inline |
Remove this from given class, do nothing if this is not in given class.
role_name | name of class from where this should be removed |
Definition at line 776 of file object.hpp.
Set max_steps.
Definition at line 554 of file object.hpp.
Set min_step_size.
Definition at line 560 of file object.hpp.
|
pure virtual |
Get shallow copy of this.
In the shallow copy all children are the same
Implemented in plask::Circle< dim >, plask::Clip< dim >, plask::RotatedCuboid, plask::Cylinder, plask::HollowCylinder, plask::Intersection< dim >, plask::ArrangeContainer< dim >, plask::Lattice, plask::Block< dim >, plask::Block< 3 >, plask::Flip< dim >, plask::Mirror< dim >, plask::Polygon, plask::TriangularPrism, plask::Prism, plask::Gap1D< dim, direction >, plask::Geometry2DCartesian, plask::Geometry2DCylindrical, plask::Geometry3D, plask::ShelfContainer2D, plask::StackContainer< dim >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Extrusion, plask::Revolution, plask::TranslationContainer< dim >, and plask::Triangle.
Check if object is ready for calculation.
Throw exception if object is in bad state and can't be used in calculations, for example has not required children, etc. Default implementation do nothing, but inherited class can change this behavior.
Exception | if object is not ready for calculation |
Reimplemented in plask::Polygon, plask::Prism, plask::GeometryObjectTransform< dim, Child_Type >, plask::GeometryObjectTransform< 3 >, plask::GeometryObjectTransform< this_dim, GeometryObjectD< 5 - this_dim > >, and plask::GeometryObjectTransform< this_dim, GeometryObjectD< child_dim > >.
Definition at line 798 of file object.hpp.
|
inline |
Write geometry tree branch rooted by this to XML.
Provides good default parameters.
parent_xml_object | destination, parent XML object |
Definition at line 677 of file object.hpp.
|
inline |
Write geometry tree branch rooted by this to XML.
Provides good default parameters.
parent_xml_object | destination, parent XML object |
write_cb | write callback, used to get names for objects and paths |
Definition at line 667 of file object.hpp.
|
virtual |
Write geometry tree branch rooted by this to XML.
Default implementation write XML tag for this (with eventual name and axes attributes) call writeXMLAttr to append extra atribiutes, and write all real children. Typically you should overwrite only writeXMLAttr method.
parent_xml_object | destination, parent XML object |
write_cb | write callback, used to get names for objects and paths |
parent_axes | names of axes (typically used by parent of this) |
Reimplemented in plask::GeometryObjectContainer< dim >, plask::StackContainer< dim >, plask::Geometry2DCartesian, and plask::Geometry2DCylindrical.
Definition at line 117 of file object.cpp.
|
protectedvirtual |
Append XML attributes of this to dest_xml_object
.
By default do nothing.
dest_xml_object | XML tag where attributes should be append |
axes | chosen name of axes |
Reimplemented in plask::ShelfContainer2D, plask::Clip< dim >, plask::Clip< dim >, plask::Clip< dim >, plask::Clip< dim >, plask::ArrangeContainer< dim >, plask::ArrangeContainer< dim >, plask::ArrangeContainer< dim >, plask::ArrangeContainer< dim >, plask::Block< dim >, plask::Block< 3 >, plask::Block< dim >, plask::Block< 3 >, plask::Block< dim >, plask::Block< 3 >, plask::Block< dim >, plask::Block< 3 >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Circle< dim >, plask::Clip< dim >, plask::RotatedCuboid, plask::Cylinder, plask::HollowCylinder, plask::ArrangeContainer< dim >, plask::Lattice, plask::Block< dim >, plask::Block< 3 >, plask::Flip< dim >, plask::Mirror< dim >, plask::Polygon, plask::TriangularPrism, plask::Prism, plask::Gap1D< dim, direction >, plask::GeometryD< dim >, plask::GeometryD< 2 >, plask::GeometryD< 3 >, plask::StackContainerBaseImpl< dim, growingDirection >, plask::StackContainerBaseImpl< 2, Primitive< 2 >::DIRECTION_TRAN >, plask::Translation< dim >, plask::Translation< DIMS >, plask::Extrusion, and plask::Triangle.
Definition at line 197 of file object.cpp.
|
protectedvirtual |
Append all children of this to XML dest_xml_object
.
dest_xml_object | XML tag where attributes should be append |
write_cb | write callback, used to get names for objects and paths |
axes | chosen name of axes |
Reimplemented in plask::Intersection< dim >, and plask::Lattice.
Definition at line 201 of file object.cpp.
Changed signal, fired when object was changed.
Definition at line 569 of file object.hpp.
unsigned plask::GeometryObject::max_steps |
Maximum number of points to split a single leaf.
Definition at line 548 of file object.hpp.
double plask::GeometryObject::min_step_size |
Minimum distance between divisions for a single leaf.
Definition at line 551 of file object.hpp.
std::set<std::string> plask::GeometryObject::roles |
Roles/tags.
Definition at line 566 of file object.hpp.