#include <Node.h>
Class to hold 0-or-1 object. Public access is only readonly using an interface similar to std::vector (size/[]/begin/end), plus an automatic conversion to one pointer. UPDATE: it is now an alias for the Link pointer container
Public Member Functions | |
NodeSingle (const BaseLink::InitLink< Node > &init) | |
T * | operator-> () const |
T & | operator* () const |
operator T* () const | |
Public Member Functions inherited from sofa::core::objectmodel::SingleLink< Node, T, BaseLink::FLAG_DOUBLELINK|(true ? BaseLink::FLAG_DUPLICATE :BaseLink::FLAG_NONE)> | |
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 > | |
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... | |
Additional Inherited Members | |
Static Public Attributes inherited from sofa::core::objectmodel::TLink< TOwnerType, TDestType, TFlags > | |
static constexpr unsigned | ActiveFlags = TFlags |
static constexpr bool | IsStrongLink = (ActiveFlags & FLAG_STRONGLINK) != 0 |
static constexpr bool | IsMultiLink = (ActiveFlags & FLAG_MULTILINK) != 0 |
static constexpr bool | StorePath = (ActiveFlags & FLAG_STOREPATH) != 0 |
Protected Attributes inherited from sofa::core::objectmodel::SingleLink< Node, T, BaseLink::FLAG_DOUBLELINK|(true ? BaseLink::FLAG_DUPLICATE :BaseLink::FLAG_NONE)> | |
ValidatorFn | m_validator |
Protected Attributes inherited from sofa::core::objectmodel::TLink< TOwnerType, TDestType, TFlags > | |
OwnerType * | m_owner {nullptr} |
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... | |
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 Member Functions inherited from sofa::core::objectmodel::SingleLink< Node, T, BaseLink::FLAG_DOUBLELINK|(true ? BaseLink::FLAG_DUPLICATE :BaseLink::FLAG_NONE)> | |
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 > | |
DestType * | getIndex (std::size_t index) const |
Protected Member Functions inherited from sofa::core::objectmodel::BaseLink | |
void | updateCounter () |
|
inline |
|
inline |
|
inline |
|
inline |