Public Types | Public Member Functions | Private Member Functions | Private Attributes

Matrix< ElementType > Class Template Reference

Generic key whose converter type is StdMatrix. More...

#include <keyvalue/key/generic/Matrix.h>

Inheritance diagram for Matrix< ElementType >:
Inheritance graph
[legend]

List of all members.

Public Types

enum  
typedef Traits< ElementType,
StdMatrix, Default
Traits_
typedef StdMatrix< typename
Default< ElementType >
::OutputType_ > 
ConverterType_
typedef ConverterType_::InputType_ InputType_
typedef ConverterType_::OutputType_ OutputType_

Public Member Functions

 Matrix (const string &name)
 Constructs the key and sets its name.
 Matrix (const string &name, size_t nRows, size_t nCols_)
 Constructs the key and sets its name and the expected dimension of the StdMatrix content.
string getName () const
 Gets Key's name.
string getName () const
 Gets name.
void setName (const string &name)
 Sets name.

Private Member Functions

void checkSize (size_t nRows, size_t nCols) const
 Checks if given and expected dimensions match.

Private Attributes

size_t nRows_
size_t nCols_

Detailed Description

template<typename ElementType>
class keyvalue::key::Matrix< ElementType >

Generic key whose converter type is StdMatrix.

Parameters:
ElementType : (template parameter) Matrix element type.

Constructor & Destructor Documentation

Matrix ( const string &  name  )  [explicit]

Constructs the key and sets its name.

Matrix ( const string &  name,
size_t  nRows,
size_t  nCols_ 
)

Constructs the key and sets its name and the expected dimension of the StdMatrix content.

Parameters:
name : The key name;
nRows : Expected number of rows;
nCols : Expected number of columns.

Member Function Documentation

void checkSize ( size_t  nRows,
size_t  nCols 
) const [private]

Checks if given and expected dimensions match.

Parameters:
nRows : Expected number of rows;
nCols : Expected number of columns.

RuntimeError : If given and expected dimension do not match.

string getName (  )  const [inherited]

Gets Key's name.

Returns:
The Key's name.
string getName (  )  const [inherited]

Gets name.

Returns:
The name.
void setName ( const string &  name  )  [inherited]

Sets name.

Parameters:
name : The name.