Public Member Functions | |
VectorValue () | |
VectorValue (const VectorValue &Val) | |
VectorValue (unsigned long Size) | |
VectorValue (unsigned long Size, double InitValue) | |
VectorValue (double *Data, unsigned long Size) | |
Value & | operator= (const Value &Other) |
virtual | ~VectorValue () |
Type | getType () const |
Value * | clone () const |
void | writeToStream (std::ostream &OutStm) const |
VectorValue is a container for a 1D vector of signed double precision floating point values.
Example : declaration
// declaration of a VectorValue, empty by default openfluid::core::VectorValue Val1; // declaration of a VectorValue of 7 elements, with values initialized to 0.0 openfluid::core::VectorValue Val2(7); // declaration of a VectorValue of 7 elements, with values initialized to 1.99 openfluid::core::VectorValue Val3(7,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 Val1.set(0,101.99); // or using the [] operator Val1[0] = 101.99;
Example : conversion from string
openfluid::core::StringValue StringVal; openfluid::core::VectorValue Val2; // to VectorValue, using a string values separator StringVal.set("3;5;2.8;6;17.999923;1;1;1;1;1;2.11;2.12;2.13;2.14;2.15"); StringVal.toVectorValue(";",Val2);
Example : conversion to string
std::string StdStrVal = Val1.toString();
openfluid::core::VectorValue::VectorValue | ( | ) | [inline] |
Default constructor
openfluid::core::VectorValue::VectorValue | ( | const VectorValue & | Val | ) | [inline] |
Copy constructor
openfluid::core::VectorValue::VectorValue | ( | unsigned long | Size | ) | [inline] |
Constructor, creates a vector containing Size elements
openfluid::core::VectorValue::VectorValue | ( | unsigned long | Size, |
double | InitValue | ||
) | [inline] |
Constructor, creates a vector containing Size elements, initialized with value InitValue
openfluid::core::VectorValue::VectorValue | ( | double * | Data, |
unsigned long | Size | ||
) | [inline] |
Constructor, creates a vector of size Size, containing Data
virtual openfluid::core::VectorValue::~VectorValue | ( | ) | [inline, virtual] |
Value* openfluid::core::VectorValue::clone | ( | ) | const [inline, virtual] |
Reimplemented from openfluid::core::Value.
Type openfluid::core::VectorValue::getType | ( | ) | const [inline, virtual] |
Implements openfluid::core::Value.
Assignment operator
Reimplemented from openfluid::core::Value.
void openfluid::core::VectorValue::writeToStream | ( | std::ostream & | OutStm | ) | const [virtual] |
Implements openfluid::core::Value.