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

Template class for a typed field that uses a std::vector to store its values. More...

#include <Field.hpp>

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

Public Member Functions

 FilledField (size_t n=0)
 
size_t size () const
 
void push_back (T x)
 
void add_missing ()
 
- Public Member Functions inherited from comservatory::TypedField< T, tt >
Type type () const
 
virtual void push_back (T x)=0
 
- Public Member Functions inherited from comservatory::Field
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::FilledField< T, tt >

Template class for a typed field that uses a std::vector to store its values.

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

Constructor & Destructor Documentation

◆ FilledField()

template<typename T , Type tt>
comservatory::FilledField< T, tt >::FilledField ( 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::FilledField< T, tt >::add_missing ( )
inlinevirtual

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

Implements comservatory::Field.

◆ push_back()

template<typename T , Type tt>
void comservatory::FilledField< 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::FilledField< 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: