SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::core::objectmodel::VectorLinks< LinkType, OwnerType > Class Template Reference

#include <vectorLinks.h>

Inheritance diagram for sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >:

Detailed Description

template<class LinkType, class OwnerType>
class sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >

A helper class which implements a vector of a variable number of Links

Warning
The first index is 1 in the Data name
Author
Matthieu Nesme
Date
2015

Protected Attributes

OwnerType * m_component
 
std::string m_name
 
std::string m_help
 

Public Member Functions

 VectorLinks (OwnerType *component, std::string const &name, std::string const &help)
 'dataEngineInOut' is only valid if 'component' is a DataEngine More...
 
 ~VectorLinks ()
 
void parseSizeLinks (sofa::core::objectmodel::BaseObjectDescription *arg, Data< unsigned int > &size)
 
void parseFieldsSizeLinks (const std::map< std::string, std::string * > &str, Data< unsigned int > &size)
 
void resize (const unsigned int size)
 
- Public Member Functions inherited from sofa::type::vector< LinkType * >
 vector ()
 Basic constructor. More...
 
 vector (Size n, const LinkType * &value)
 Constructor. More...
 
 vector (Size n)
 Constructor. More...
 
 vector (const std::vector< LinkType *, Alloc > &x)
 Constructor. More...
 
 vector (const std::initializer_list< LinkType * > &t)
 Brace initalizer constructor. More...
 
 vector (std::vector< LinkType *, Alloc > &&v)
 Move constructor. More...
 
 vector (typename vector< LinkType * >::const_iterator first, typename vector< LinkType * >::const_iterator last)
 Constructor. More...
 
vectoroperator= (const std::vector< LinkType *, Alloc > &x)
 Copy operator. More...
 
vectoroperator= (std::vector< LinkType *, Alloc > &&v)
 Move assignment operator. More...
 
reference operator[] (Size n)
 Read/write random access. More...
 
const_reference operator[] (Size n) const
 Read-only random access. More...
 
std::ostream & write (std::ostream &os) const
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 Specialization for writing vectors of unsigned char. More...
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 
SOFA_TYPE_API std::ostream & write (std::ostream &os) const
 
std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 Specialization for reading vectors of int and unsigned int using "A-B" notation for all integers between A and B. More...
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
SOFA_TYPE_API std::istream & read (std::istream &in)
 
void fill (const LinkType * &value)
 Sets every element to 'value'. More...
 
void fastResize (Size n)
 

Attribute details

◆ m_component

template<class LinkType , class OwnerType >
OwnerType* sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::m_component
protected

◆ m_help

template<class LinkType , class OwnerType >
std::string sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::m_help
protected

◆ m_name

template<class LinkType , class OwnerType >
std::string sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::m_name
protected

Constructor details

◆ VectorLinks()

template<class LinkType , class OwnerType >
sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::VectorLinks ( OwnerType *  component,
std::string const &  name,
std::string const &  help 
)
inline

'dataEngineInOut' is only valid if 'component' is a DataEngine

◆ ~VectorLinks()

template<class LinkType , class OwnerType >
sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::~VectorLinks ( )
inline

Function details

◆ parseFieldsSizeLinks()

template<class LinkType , class OwnerType >
void sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::parseFieldsSizeLinks ( const std::map< std::string, std::string * > &  str,
Data< unsigned int > &  size 
)
inline

◆ parseSizeLinks()

template<class LinkType , class OwnerType >
void sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::parseSizeLinks ( sofa::core::objectmodel::BaseObjectDescription arg,
Data< unsigned int > &  size 
)
inline

◆ resize()

template<class LinkType , class OwnerType >
void sofa::core::objectmodel::VectorLinks< LinkType, OwnerType >::resize ( const unsigned int  size)
inline