PLaSK library
|
Geometry changer which holds vector of changers and try to apply this changers sequentially. More...
#include <plask/geometry/object.hpp>
Public Member Functions | |
CompositeChanger (const Changer *changer) | |
Construct CompositeChanger and append changer to its changers list. | |
CompositeChanger & | operator() (const Changer *changer) |
Append changer to changers list. | |
CompositeChanger & | append (const Changer *changer) |
Append changer to changers list. | |
CompositeChanger () | |
Construct empty composit changer. | |
~CompositeChanger () | |
Delete all held changers (using delete operator). | |
bool | apply (shared_ptr< GeometryObject > &to_change, Vec< 3, double > *translation=0) const override |
Try to apply changes. | |
Public Member Functions inherited from plask::GeometryObject::Changer | |
virtual | ~Changer () |
Virtual destructor. Do nothing. | |
Public Attributes | |
std::vector< const Changer * > | changers |
Geometry changer which holds vector of changers and try to apply this changers sequentially.
Its apply method call: changers[0].apply(to_change, translation), changers[1].apply(to_change, translation), ... up to time when one of this call returns true
(and then it returns true
) or there are no mora changers in changes vector (and then it returns false
).
Definition at line 348 of file object.hpp.
Construct CompositeChanger and append changer
to its changers list.
changer | changer to append, will be deleted by destructor of this |
Definition at line 25 of file object.cpp.
|
inline |
Construct empty composit changer.
Definition at line 374 of file object.hpp.
plask::GeometryObject::CompositeChanger::~CompositeChanger | ( | ) |
Delete all held changers (using delete operator).
Definition at line 34 of file object.cpp.
|
inline |
Append changer
to changers list.
changer | changer to append |
*this
Definition at line 369 of file object.hpp.
|
overridevirtual |
Try to apply changes.
[in,out] | to_change | pointer to object which eventually will be changed (in such case pointer after call can point to another geometry object) |
[out] | translation | optional, extra translation for object after change (in case of 2d object caller reads only tran and up components of this vector) |
true
only if something was changed, false
if nothing was changed (in such case changer doesn't change arguments) Implements plask::GeometryObject::Changer.
Definition at line 38 of file object.cpp.
GeometryObject::CompositeChanger & plask::GeometryObject::CompositeChanger::operator() | ( | const Changer * | changer | ) |
Append changer
to changers list.
changer | changer to append |
*this
Definition at line 29 of file object.cpp.
Definition at line 349 of file object.hpp.