#include <Link.h>
Container of single links in the scenegraph, from a given type of object (Owner) to another (Dest) More...
Container of single links in the scenegraph, from a given type of object (Owner) to another (Dest)
Protected Attributes | |
ValidatorFn | m_validator |
Protected Attributes inherited from sofa::core::objectmodel::TLink< TOwnerType, TDestType, TFlags &~BaseLink::FLAG_MULTILINK > | |
OwnerType * | m_owner |
Container | m_value |
Protected Attributes inherited from sofa::core::objectmodel::BaseLink | |
unsigned int | m_flags |
std::string | m_name |
std::string | m_help |
int | m_counter |
Number of changes since creation. More... | |
Public Member Functions | |
SingleLink () | |
SingleLink (const BaseLink::InitLink< OwnerType > &init) | |
SingleLink (const BaseLink::InitLink< OwnerType > &init, DestPtr val) | |
virtual | ~SingleLink () |
void | setValidator (ValidatorFn fn) |
DestType * | get () const |
void | reset () |
void | set (DestPtr v) |
void | set (DestPtr v, const std::string &path) |
void | setPath (const std::string &path) |
operator DestType * () const | |
Convenient operators to make a SingleLink appear as a regular pointer. More... | |
DestType * | operator-> () const |
DestType & | operator* () const |
DestPtr | operator= (DestPtr v) |
Public Member Functions inherited from sofa::core::objectmodel::TLink< TOwnerType, TDestType, TFlags &~BaseLink::FLAG_MULTILINK > | |
TLink () | |
TLink (const InitLink< OwnerType > &init) | |
~TLink () override | |
size_t | size () const |
bool | empty () const |
const Container & | getValue () const |
const_iterator | begin () const |
const_iterator | end () const |
const_reverse_iterator | rbegin () const |
const_reverse_iterator | rend () const |
void | clear () |
bool | addBegin (DestPtr v) |
bool | add (DestPtr v) |
bool | add (DestPtr v, const std::string &path) |
bool | addPath (const std::string &path) |
bool | remove (DestPtr v) |
bool | removeAt (std::size_t index) |
bool | removePath (const std::string &path) |
const BaseClass * | getDestClass () const override |
const BaseClass * | getOwnerClass () const override |
size_t | getSize () const override |
sofa::core::objectmodel::Base * | getOwnerBase () const override |
void | setOwner (OwnerType *owner) |
Public Member Functions inherited from sofa::core::objectmodel::BaseLink | |
BaseLink (LinkFlags flags) | |
BaseLink (const BaseInitLink &init, LinkFlags flags) | |
virtual | ~BaseLink () |
const std::string & | getName () const |
void | setName (const std::string &name) |
const std::string & | getHelp () const |
Get help message. More... | |
void | setHelp (const std::string &val) |
Set help message. More... | |
void | setFlag (LinkFlagsEnum flag, bool b) |
Set one of the flags. More... | |
bool | getFlag (LinkFlagsEnum flag) const |
Get one flag. More... | |
bool | isMultiLink () const |
bool | isStrongLink () const |
bool | isDoubleLink () const |
bool | isDuplicate () const |
bool | storePath () const |
void | setPersistent (bool b) |
Alias to match BaseData API. More... | |
bool | isPersistent () const |
bool | isReadOnly () const |
Alias to match BaseData API. More... | |
int | getCounter () const |
void | setLinkedBase (Base *link) |
Base * | getLinkedBase (std::size_t index=0) const |
void | clear () |
std::string | getLinkedPath (const std::size_t index=0) const |
std::string | getPath (std::size_t index=0) const |
bool | read (const std::string &str) |
Read the command line. More... | |
bool | updateLinks () |
virtual void | printValue (std::ostream &) const |
Print the value of the associated variable. More... | |
virtual std::string | getValueString () const |
Print the value of the associated variable. More... | |
virtual std::string | getValueTypeString () const |
Print the value type of the associated variable. More... | |
bool | parseString (const std::string &text, std::string *path, std::string *data=nullptr) const |
Base * | getOwner () const |
void | setOwner (Base *owner) |
bool | add (Base *baseptr, const std::string &path) |
Add a new target to the link. More... | |
bool | set (Base *baseptr, size_t index=0) |
Change the link's target at the provided index. More... | |
Protected Member Functions | |
void | added (DestPtr val, std::size_t) |
void | removed (DestPtr val, std::size_t) |
void | changed (DestPtr before, DestPtr val) |
Protected Member Functions inherited from sofa::core::objectmodel::TLink< TOwnerType, TDestType, TFlags &~BaseLink::FLAG_MULTILINK > | |
DestType * | getIndex (std::size_t index) const |
Protected Member Functions inherited from sofa::core::objectmodel::BaseLink | |
void | updateCounter () |
Additional Inherited Members | |
Static Public Attributes inherited from sofa::core::objectmodel::TLink< TOwnerType, TDestType, TFlags &~BaseLink::FLAG_MULTILINK > | |
static constexpr unsigned | ActiveFlags |
static constexpr bool | IsStrongLink |
static constexpr bool | IsMultiLink |
static constexpr bool | StorePath |
Static Public Member Functions inherited from sofa::core::objectmodel::BaseLink | |
static bool | ParseString (const std::string &text, std::string *path, std::string *data=nullptr, Base *start=nullptr) |
static std::string | CreateString (const std::string &path, const std::string &data="") |
static std::string | CreateStringPath (Base *object, Base *from) |
static std::string | CreateStringData (BaseData *data) |
static std::string | CreateString (Base *object, Base *from) |
static std::string | CreateString (BaseData *data, Base *from) |
static std::string | CreateString (Base *object, BaseData *data, Base *from) |
|
protected |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
|
inlineprotectedvirtual |
|
inlineprotected |
|
inline |
|
inline |
Convenient operators to make a SingleLink appear as a regular pointer.
|
inline |
|
inline |
|
inline |
|
inlineprotectedvirtual |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |