Public Member Functions | List of all members
openfluid::core::VectorValue Class Reference

#include <core/VectorValue.hpp>

Inheritance diagram for openfluid::core::VectorValue:
Inheritance graph
Collaboration diagram for openfluid::core::VectorValue:
Collaboration graph

Public Member Functions

 VectorValue ()
 VectorValue (const VectorValue &Val)
 VectorValue (unsigned long Size)
 VectorValue (unsigned long Size, double InitValue)
 VectorValue (double *Data, unsigned long Size)
virtual ~VectorValue ()
Valueoperator= (const Value &Other)
Type getType () const
Valueclone () const
void writeToStream (std::ostream &OutStm) const
void writeQuotedToStream (std::ostream &OutStm) const
- Public Member Functions inherited from openfluid::core::CompoundValue
 CompoundValue ()
bool isSimple () const
bool isCompound () const
- Public Member Functions inherited from openfluid::core::Value
 Value ()
virtual ~Value ()
virtual bool convert (Value &) const
bool isDoubleValue () const
const DoubleValueasDoubleValue () const
DoubleValueasDoubleValue ()
bool isIntegerValue () const
const IntegerValueasIntegerValue () const
IntegerValueasIntegerValue ()
bool isBooleanValue () const
const BooleanValueasBooleanValue () const
BooleanValueasBooleanValue ()
bool isStringValue () const
const StringValueasStringValue () const
StringValueasStringValue ()
bool isNullValue () const
const NullValueasNullValue () const
NullValueasNullValue ()
bool isVectorValue () const
const VectorValueasVectorValue () const
VectorValueasVectorValue ()
bool isMatrixValue () const
const MatrixValueasMatrixValue () const
MatrixValueasMatrixValue ()
bool isMapValue () const
const MapValueasMapValue () const
MapValueasMapValue ()
bool isTreeValue () const
const TreeValueasTreeValue () const
TreeValueasTreeValue ()
std::string toString () const
- Public Member Functions inherited from openfluid::core::Vector< double >
 Vector ()
 Vector (const Vector &Vector)
 Vector (unsigned long Size)
 Vector (unsigned long Size, doubleInitValue)
 Vector (double *Data, unsigned long Size)
 ~Vector ()
unsigned long getSize () const
unsigned long size () const
double * data () const
void setData (double *Data, unsigned long Size)
double getElement (unsigned long Index) const
double at (unsigned long Index) const
double get (unsigned long Index) const
void setElement (unsigned long Index, doubleElement)
void set (unsigned long Index, doubleElement)
double & operator[] (unsigned long Index)
Vector< double > & operator= (const Vector &A)
void fill (const double &Val)
void clear ()
iterator begin ()
const_iterator begin () const
iterator end ()
const_iterator end () const

Additional Inherited Members

- Public Types inherited from openfluid::core::Value
enum  Type {
- Public Types inherited from openfluid::core::Vector< double >
typedef double * iterator
typedef const double * const_iterator
- Static Public Member Functions inherited from openfluid::core::Value
static bool getValueTypeFromString (const std::string &ValueTypeString, Value::Type &ValueType)
static std::string getStringFromValueType (const Value::Type ValueType)
- Protected Member Functions inherited from openfluid::core::Vector< double >
bool allocate (unsigned long Size)
void init ()
- Static Protected Member Functions inherited from openfluid::core::Vector< double >
static void copy (const Vector &Source, Vector &Dest)
- Protected Attributes inherited from openfluid::core::Vector< double >
double * m_Data
unsigned long m_Size

Detailed Description

VectorValue is a container for a 1D vector of signed double precision floating point values.

See also

Example : declaration

// declaration of a VectorValue, empty by default
// declaration of a VectorValue of 7 elements, with values initialized to 0.0
// declaration of a VectorValue of 7 elements, with values initialized to 1.99

Example : getting the contained values

double Tmp1;
// using the get method
Tmp1 = Val1.get(2);
// or using the [] operator
Tmp1 = Val1[2];

Example : getting all values as a c-style array of double

double DblArrayVal[];
DblArrayVal = Val1.getData();

Example : setting the contained values

// using the set method
// or using the [] operator
Val1[0] = 101.99;

Example : conversion from string

// to VectorValue, using a string values separator

Example : conversion to string

std::string StdStrVal = Val1.toString();

Constructor & Destructor Documentation

openfluid::core::VectorValue::VectorValue ( )

Default constructor

openfluid::core::VectorValue::VectorValue ( const VectorValue Val)

Copy constructor

openfluid::core::VectorValue::VectorValue ( unsigned long  Size)

Constructor, creates a vector containing Size elements

openfluid::core::VectorValue::VectorValue ( unsigned long  Size,
double  InitValue 

Constructor, creates a vector containing Size elements, initialized with value InitValue

openfluid::core::VectorValue::VectorValue ( double *  Data,
unsigned long  Size 

Constructor, creates a vector of size Size, containing Data

virtual openfluid::core::VectorValue::~VectorValue ( )

Member Function Documentation

Value* openfluid::core::VectorValue::clone ( ) const

Reimplemented from openfluid::core::Value.

Type openfluid::core::VectorValue::getType ( ) const
Value& openfluid::core::VectorValue::operator= ( const Value )

Assignment operator

Reimplemented from openfluid::core::Value.

void openfluid::core::VectorValue::writeQuotedToStream ( std::ostream &  OutStm) const
void openfluid::core::VectorValue::writeToStream ( std::ostream &  OutStm) const

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