StringVector Class Reference

string vector variable More...

#include <StringVector.h>

Inheritance diagram for StringVector:

Public Member Functions

 StringVector (const std::string &tag, const std::string &description, int count, const std::string &value, Persistent *parent=nullptr)
 
 StringVector (StringVector &&other)
 move constructor More...
 
StringVectoroperator= (StringVector &&other)
 move assignment; we use a little trick with the return type More...
 
const std::string & type () const override
 
- Public Member Functions inherited from TypeVector< std::string >
 TypeVector (const std::string &tag, const std::string &description, Persistent *parent, int count, const std::string &value)
 main constructor More...
 
 TypeVector (TypeVector &&other)
 move constructor More...
 
TypeVectoroperator= (TypeVector &&other)
 move assignment More...
 
std::string & operator[] (std::size_t index)
 
const std::string & at (std::size_t index) const
 
std::size_t size (void) const
 
virtual void resize (std::size_t count)
 resizes the number of elements contained to count More...
 
void set (const std::string &value)
 sets the value for all elements More...
 
- Public Member Functions inherited from Type< std::vector< std::string > >
 Type (const std::string &tag, const std::string &description, Persistent *parent, const std::vector< std::string > &value)
 main constructor More...
 
 Type (Type &&other)
 move constructor More...
 
Typeoperator= (Type &&other)
 move assignment More...
 
std::vector< std::string > & value (void)
 Type value getter. More...
 
const std::vector< std::string > & value (void) const
 
bool operator!= (const Type &rhs) const
 
bool operator== (const Type &rhs) const
 
- Public Member Functions inherited from Item
 Item (const Item &other)
 copy constructor copies all elements but parent which is set to nullptr More...
 
Itemoperator= (const Item &other)
 copy assignment operator copies all elements but parent which is set to nullptr More...
 
 Item (const std::string &tag, const std::string &description, Persistent *parent)
 
 Item (Item &&other)
 move constructor More...
 
Itemoperator= (Item &&other)
 move assignment operator More...
 
virtual ~Item ()
 
const std::string & tag () const
 
const std::string & description () const
 
std::string fullTag () const
 
const Persistentparent () const
 
virtual const std::string & type () const =0
 
void setTag (const std::string &tag)
 
void setDescription (const std::string &description)
 
void setWideTag (const std::wstring &tag)
 wide-character variant, More...
 
void setWideDescription (const std::wstring &description)
 wide-character variant, More...
 
bool operator!= (const Item &rhs) const
 
bool operator== (const Item &rhs) const
 

Additional Inherited Members

- Public Types inherited from Type< std::vector< std::string > >
typedef std::vector< std::string > ValueType
 name the value type to make it possible for function templates acting on Type<T> to access T properties and methods More...
 
- Protected Attributes inherited from Type< std::vector< std::string > >
std::vector< std::string > value_
 
- Protected Attributes inherited from Item
Persistentparent_
 pointer to the parent Persistent; set to this by the constructor if Item is self-standing or a root Persistent of a tree More...
 

Detailed Description

string vector variable

used for vector configuration parameters

#include <libpf/persistency/StringVector.h>

Remarks
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ StringVector() [1/2]

StringVector::StringVector ( const std::string &  tag,
const std::string &  description,
int  count,
const std::string &  value,
Persistent parent = nullptr 
)

main constructor

Parameters
tagUTF-8 encoded human-readable label, unique among siblings
descriptionUTF-8 encoded description
countnumber of elements
valueinitialization value for all elements
parentpointer to the parent Persistent; set to this by the constructor if Item is self-standing or a root Persistent of a tree

◆ StringVector() [2/2]

StringVector::StringVector ( StringVector &&  other)

move constructor

Member Function Documentation

◆ operator=()

StringVector & StringVector::operator= ( StringVector &&  other)

move assignment; we use a little trick with the return type

◆ type()

const std::string & StringVector::type ( ) const
overridevirtual
Returns
the C++ name of the class the instance belongs to
Note
it is the responsibility of the caller to not access this reference after the lifecycle of the Item

Implements Item.


The documentation for this class was generated from the following file: