STK++ 0.9.13
|
IVariable is an Interface class for all Variables classes. More...
#include <STK_IVariable.h>
Public Member Functions | |
virtual | ~IVariable () |
destructor. | |
IVariable & | operator= (const IVariable &V) |
Operator = : overwrite the IVariable with T. | |
const Base::IdType & | getType () const |
String const & | name () const |
void | setName (int num=0, String const &prefix=STRING_VAR) |
Set a default name for the variable of the form : prefix + num. | |
void | setName (String const &name) |
Set the name of the variable. | |
template<class Type > | |
String | eltAsString (int pos) const |
virtual void | exportAsString (VariableString &V) const =0 |
Overwrite the variable V by converting the data into strings. | |
virtual void | pushBackNAValues (int n=1)=0 |
push back n NA values. | |
virtual int | size () const =0 |
virtual void | insertElt (int pos, int n=1)=0 |
Insert n elements at the position pos of the container. | |
virtual void | clear ()=0 |
clear Container from all elements and memory allocated. | |
virtual void | erase (int pos, int n=1)=0 |
Delete n elements at the pos index from the container. | |
virtual void | shift (int beg)=0 |
New first index for the object. | |
virtual void | pushBack (int n=1)=0 |
Add n elements at the end of the container. | |
virtual void | popBack (int n=1)=0 |
Delete n last elements of the container. | |
virtual IVariable & | operator<< (VariableString const &V)=0 |
Operator << : overwrite the IVariable by converting the strings contained in V into the Type. | |
virtual const IVariable & | operator>> (VariableString &V) const =0 |
Operator >> : convert the Variable V into strings. | |
virtual IVariable * | clone (bool ref=false) const =0 |
Static Public Member Functions | |
static String | giveName (int num=0, String const &prefix=STRING_VAR) |
Protected Member Functions | |
IVariable (Base::IdType const &type, String const &name) | |
Default constructor. | |
IVariable (const IVariable &V) | |
Copy constructor | |
Protected Attributes | |
const Base::IdType | type_ |
Id Type of the variable. | |
String | name_ |
Name of the variable. | |
IVariable is an Interface class for all Variables classes.
A Variable have a name and a type, the implementation have to choose some one-dimensional container class derived from IContainer2D for storing the data.
The pure virtual function defined in this class are the one needed by the DataFrame class which handle an heterogeneous collection of Variable.
Definition at line 60 of file STK_IVariable.h.
|
inlineprotected |
Copy constructor
Definition at line 72 of file STK_IVariable.h.
|
inlinevirtual |
clear Container from all elements and memory allocated.
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
ref | true if we don't want to copy the data |
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::insertDataFrame(), and STK::DataFrame::pushBackDataFrame().
Definition at line 99 of file STK_IVariable.h.
Delete n elements at the pos
index from the container.
pos | index where to delete elements |
n | number of elements to delete (default 1) |
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::eraseRows().
|
pure virtual |
Overwrite the variable V by converting the data into strings.
V | Variable of String |
Referenced by STK::ExportToCsv::ExportToCsv().
|
inline |
|
inlinestatic |
Definition at line 86 of file STK_IVariable.h.
Insert n elements at the position pos of the container.
pos | index where to insert elements |
n | number of elements to insert (default 1) |
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::insertRows().
Definition at line 91 of file STK_IVariable.h.
References name_.
Referenced by STK::Variable< Type_ >::maxLength(), and setName().
|
pure virtual |
Operator = : overwrite the IVariable with T.
Definition at line 80 of file STK_IVariable.h.
References name_.
|
pure virtual |
Delete n last elements of the container.
n | number of elements to delete |
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::popBackRows().
Add n elements at the end of the container.
n | number of elements to add |
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::pushBackRows().
push back n NA values.
n | number of NA values to add |
Implemented in STK::Variable< Type_ >, STK::Variable< Real >, STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::insertDataFrame(), STK::DataFrame::insertVariable(), STK::DataFrame::merge(), STK::DataFrame::pushBackDataFrame(), and STK::DataFrame::pushBackVariable().
Set a default name for the variable of the form : prefix + num.
Definition at line 93 of file STK_IVariable.h.
References name_.
New first index for the object.
beg | the index of the first column to set |
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::insertDataFrame(), STK::DataFrame::insertVariable(), STK::DataFrame::pushBackDataFrame(), STK::DataFrame::pushBackVariable(), and STK::DataFrame::shift().
Implemented in STK::Variable< Type_ >, and STK::Variable< Real >.
Referenced by STK::DataFrame::insertVariable(), and STK::DataFrame::pushBackVariable().
|
protected |
Name of the variable.
Definition at line 66 of file STK_IVariable.h.
Referenced by STK::Variable< Type_ >::move(), name(), operator=(), STK::Variable< Type_ >::operator=(), setName(), and setName().
|
protected |