comservatory
Strict validation of CSV files in C++
Loading...
Searching...
No Matches
Public Member Functions | List of all members
comservatory::DummyField< T, tt > Struct Template Reference

Template class for a typed dummy field that only pretends to store its values. More...

#include <Field.hpp>

Inheritance diagram for comservatory::DummyField< T, tt >:
Inheritance graph
[legend]
Collaboration diagram for comservatory::DummyField< T, tt >:
Collaboration graph
[legend]

Public Member Functions

 DummyField (size_t n=0)
 
size_t size () const
 
void push_back (T)
 
void add_missing ()
 
bool filled () const
 
- Public Member Functions inherited from comservatory::TypedField< T, tt >
Type type () const
 
virtual void push_back (T x)=0
 
virtual size_t size () const =0
 
virtual Type type () const =0
 
virtual void add_missing ()=0
 
virtual bool filled () const
 

Detailed Description

template<typename T, Type tt>
struct comservatory::DummyField< T, tt >

Template class for a typed dummy field that only pretends to store its values.

Template Parameters
TData type used to store the values.
ttThe Type to be returned by type().

Constructor & Destructor Documentation

◆ DummyField()

template<typename T , Type tt>
comservatory::DummyField< T, tt >::DummyField ( size_t  n = 0)
inline
Parameters
nNumber of missing values with which to fill the field's vector. This may be non-zero if converting a field from an UnknownField.

Member Function Documentation

◆ add_missing()

template<typename T , Type tt>
void comservatory::DummyField< T, tt >::add_missing ( )
inlinevirtual

Append a missing value onto the field's vector of values.

Implements comservatory::Field.

◆ filled()

template<typename T , Type tt>
bool comservatory::DummyField< T, tt >::filled ( ) const
inlinevirtual
Returns
Boolean indicating whether this object contains loaded data. This may be false if it is just a dummy for validation/placeholder purposes.

Reimplemented from comservatory::Field.

◆ push_back()

template<typename T , Type tt>
void comservatory::DummyField< T, tt >::push_back ( x)
inlinevirtual
Parameters
xValue to be appended to the TypedField's vector of values.

Implements comservatory::TypedField< T, tt >.

◆ size()

template<typename T , Type tt>
size_t comservatory::DummyField< T, tt >::size ( ) const
inlinevirtual
Returns
Current size of the field, i.e., the number of records.

Implements comservatory::Field.


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