QuantityMatrix Class Reference

real matrix variable More...

#include <QuantityMatrix.h>

Inheritance diagram for QuantityMatrix:

Public Member Functions

 QuantityMatrix (const std::string &tag, const std::string &description, std::pair< int, int > size, const Value &value, Persistent *parent=nullptr)
 
 QuantityMatrix (QuantityMatrix &&other)
 move constructor More...
 
QuantityMatrixoperator= (QuantityMatrix &&other)
 move assignment More...
 
const std::string & type () const override
 
const Valueoperator() (std::size_t row, std::size_t column) const
 
Valueoperator() (std::size_t row, std::size_t column)
 
void set (double v)
 
bool input () const
 
bool output () const
 
void setInput ()
 
void setOutput ()
 
const std::string unit () const
 
void resize (std::size_t count) override
 resizes the number of elements contained to count More...
 
- Public Member Functions inherited from TypeVector< Value >
 TypeVector (const std::string &tag, const std::string &description, Persistent *parent, int count, const Value &value)
 main constructor More...
 
 TypeVector (TypeVector &&other)
 move constructor More...
 
TypeVectoroperator= (TypeVector &&other)
 move assignment More...
 
Valueoperator[] (std::size_t index)
 
const Valueat (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 Value &value)
 sets the value for all elements More...
 
- Public Member Functions inherited from Type< std::vector< Value > >
 Type (const std::string &tag, const std::string &description, Persistent *parent, const std::vector< Value > &value)
 main constructor More...
 
 Type (Type &&other)
 move constructor More...
 
Typeoperator= (Type &&other)
 move assignment More...
 
std::vector< Value > & value (void)
 Type value getter. More...
 
const std::vector< Value > & 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< Value > >
typedef std::vector< ValueValueType
 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< Value > >
std::vector< Valuevalue_
 
- 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

real matrix variable

used for matrices

#include <libpf/persistency/QuantityMatrix.h>

Remarks
empty matrices can only be created for adimensional Values
Warning
Thread safe:
Extendable:
Platform dependencies:

Constructor & Destructor Documentation

◆ QuantityMatrix() [1/2]

QuantityMatrix::QuantityMatrix ( const std::string &  tag,
const std::string &  description,
std::pair< int, int >  size,
const Value value,
Persistent parent = nullptr 
)

main constructor

Parameters
tagUTF-8 encoded human-readable label, unique among siblings
descriptionUTF-8 encoded description
sizenumber of rows and columns
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

◆ QuantityMatrix() [2/2]

QuantityMatrix::QuantityMatrix ( QuantityMatrix &&  other)

move constructor

Member Function Documentation

◆ input()

bool QuantityMatrix::input ( ) const

◆ operator()() [1/2]

Value & QuantityMatrix::operator() ( std::size_t  row,
std::size_t  column 
)
Returns
a reference to the element at the supplied row and column
Parameters
rowrow index of element to retrieve, 0-base
columncolumn index of element to retrieve, 0-base
Exceptions
ErrorRunTimeif indices are outside range

◆ operator()() [2/2]

const Value & QuantityMatrix::operator() ( std::size_t  row,
std::size_t  column 
) const
Returns
a const reference to the element at the supplied row and column
Parameters
rowrow index of element to retrieve, 0-base
columncolumn index of element to retrieve, 0-base
Exceptions
ErrorRunTimeif indices are outside range

◆ operator=()

QuantityMatrix & QuantityMatrix::operator= ( QuantityMatrix &&  other)

move assignment

◆ output()

bool QuantityMatrix::output ( ) const

◆ resize()

void QuantityMatrix::resize ( std::size_t  count)
overridevirtual

resizes the number of elements contained to count

Reimplemented from TypeVector< Value >.

◆ set()

void QuantityMatrix::set ( double  v)
inline

◆ setInput()

void QuantityMatrix::setInput ( )

◆ setOutput()

void QuantityMatrix::setOutput ( )

◆ type()

const std::string & QuantityMatrix::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.

◆ unit()

const std::string QuantityMatrix::unit ( ) const

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