Generic key whose converter type is StdVector. More...
#include <keyvalue/key/generic/Vector.h>

Public Types | |
| enum | |
|
typedef Traits< ElementType, StdVector, Default > | Traits_ |
|
typedef StdVector< typename Default< ElementType > ::OutputType_ > | ConverterType_ |
| typedef ConverterType_::InputType_ | InputType_ |
| typedef ConverterType_::OutputType_ | OutputType_ |
Public Member Functions | |
| Vector (const string &name, size_t size=0) | |
| Constructs the key and sets its name and the expected size of the StdVector 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 size) const |
| Checks if size matches expected size. | |
Private Attributes | |
| size_t | size_ |
Generic key whose converter type is StdVector.
On construction, the key name and the expected size of the StdVector content are fixed. (Recall that StdVector holds a vector.) At the time the value for this key is requested, the size of StdVector content and its expected size will be compared. If they do not match, then an exception::RuntimeError will be thrown.
| ElementType | : (template parameter) Vector element type. |
| Vector | ( | const string & | name, | |
| size_t | size = 0 | |||
| ) | [explicit] |
| void checkSize | ( | size_t | size | ) | const [private] |
Checks if size matches expected size.
| size | : The size. |
RuntimeError : If size does not match expected size.
| string getName | ( | ) | const [inherited] |
Gets Key's name.
| string getName | ( | ) | const [inherited] |
Gets name.
| void setName | ( | const string & | name | ) | [inherited] |
Sets name.
| name | : The name. |
1.7.1