In file Value.hh:

class Value

Defines an event value

Inheritance:


Public Fields

[more]static const int kMaxValueSize
Maximum data size

Public Methods

[more] Value ()
Default constructor
[more] Value (const Value& val)
Copy constructor
[more] ~Value ()
Denstructor
[more]Value& operator= (const Value& val)
Assignment operator
[more]virtual Value* Copy () const
Copy the event function
[more] Value (Real x)
Default constructor
[more] Value (Int i)
Constructor (int)
[more] Value (const Time& t)
Constructor (Time)
[more] Value (const Complex& c)
Constructor (complex)
[more] Value (const String& s)
Constructor (string)
[more] Value (const char* s, int len = -1)
Constructor (string)
[more] Value (const Event& e)
Constructor (event)
[more] Value (Enum type, const void* p)
Constructor (specified type)
[more]bool Write (Real& x) const
Get value
[more]bool Write (Int& i) const
Get value
[more]bool Write (Complex& c) const
Get value
[more]bool Write (Time& t) const
Get value
[more]bool Write (std::string& s) const
Get value
[more]bool Write (char* p, int& len) const
Get value
[more]bool Write (Event& e) const
Get value
[more]bool Write (Enum type, data_ptr p) const
Get value
[more]bool Read (Real x)
Set value
[more]bool Read (Int i)
Set value
[more]bool Read (const Complex& x)
Set value
[more]bool Read (const Time& t)
Set value
[more]bool Read (const std::string& s)
Set value
[more]bool Read (const char* p, int len = -1)
Set value
[more]bool Read (const Event& e)
Set value
[more]bool Read (Enum type, const_data_ptr p)
Set value
[more]valuetype Type () const
Value type
[more]virtual bool Evaluate (const Argument&, Value& x) const
Function value
[more]Value& operator += (const Value& val)
Value math (plus equal)
[more]Value& operator -= (const Value& val)
Value math (minus equal)
[more]Value& operator *= (const Value& val)
Value math (times equal)
[more]Value& operator /= (const Value& val)
Value math (over equal)
[more]Value& operator %= (const Value& val)
Value math (mod equal)
[more]Value& operator |= (const Value& val)
Value math (or equal)
[more]Value& operator &= (const Value& val)
Value math (and equal)
[more]Value& operator ^= (const Value& val)
Value math (xor equal)
[more]Value& operator >>= (const Value& val)
Value math (shift right)
[more]Value& operator <<= (const Value& val)
Value math (shift left equal)

Public Members

[more]typedef ColumnType::Enum valuetype
Value type
[more]union Union
Value union


Inherited from Function:

Public Methods

obool operator() (const Argument& arg, Value& val) const
obool operator() (const Event& event, Value& val) const


Documentation

The event value class contains the number value including its type. Typically, the values of event columns are returned as event values. A value is also a constant function!

otypedef ColumnType::Enum valuetype
Value type

ounion Union
Value union

ostatic const int kMaxValueSize
Maximum data size

o Value()
Creates an event value.

o Value(const Value& val)
Copy constructor.

o ~Value()
Destructs an event argument.

oValue& operator= (const Value& val)
Assignment operator.

ovirtual Value* Copy() const
Returns a copy of the event function. This method must be overriden by all descendents.
Returns:
event function copy

o Value(Real x)
Creates an event value.

o Value(Int i)
Creates an event value.

o Value(const Time& t)
Creates an event value.

o Value(const Complex& c)
Creates an event value.

o Value(const String& s)
Creates an event value.

o Value(const char* s, int len = -1)
Creates an event value. If the length argument is negative the strlen function is used to determine the length of the data.

o Value(const Event& e)
Creates an event value.

o Value(Enum type, const void* p)
Creates an event value.

obool Write(Real& x) const
Get value in real format.
Returns:
True if conversion possible

obool Write(Int& i) const
Get value in int format.
Returns:
True if conversion possible

obool Write(Complex& c) const
Get value in complex format.
Returns:
True if conversion possible

obool Write(Time& t) const
Get value in Time format.
Returns:
True if conversion possible

obool Write(std::string& s) const
Get value in string format.
Returns:
True if conversion possible

obool Write(char* p, int& len) const
Get value in string format. The length has to be set to the maximum size of the character buffer p before the call. It will return the actual length of the string (non counting a terminating NULL character). The returned string is always NULL terminated regardless whether the string contains ASCII or binary data. Do not use strlen to determine the length of the string if it contains binary data!
Returns:
True if conversion possible

obool Write(Event& e) const
Get value in event format.
Returns:
True if conversion possible

obool Write(Enum type, data_ptr p) const
Get value in the specified format.
Returns:
True if conversion possible

obool Read(Real x)
Set value in real format.
Returns:
True if conversion possible

obool Read(Int i)
Set value in int format.
Returns:
True if conversion possible

obool Read(const Complex& x)
Set value in complex format.
Returns:
True if conversion possible

obool Read(const Time& t)
Set value in Time format.
Returns:
True if conversion possible

obool Read(const std::string& s)
Set value in string format.
Returns:
True if conversion possible

obool Read(const char* p, int len = -1)
Set value in string format. If the length argument is negative the strlen function is used to determine the length of the data.
Returns:
True if conversion possible

obool Read(const Event& e)
Set value in event format.
Returns:
True if conversion possible

obool Read(Enum type, const_data_ptr p)
Set value in the specified format. If the data pointer is null, the value is set to the default value of this type.
Returns:
True if conversion possible

ovaluetype Type() const
Type of value.

ovirtual bool Evaluate(const Argument&, Value& x) const
A value is a constant function.
Parameters:
- arg Event argument list
x - value (return)
Returns:
True if function could be evaluated

oValue& operator += (const Value& val)
Math operator for value (plus equal).
Returns:
itself

oValue& operator -= (const Value& val)
Math operator for value (minus equal).
Returns:
itself

oValue& operator *= (const Value& val)
Math operator for value (times equal).
Returns:
itself

oValue& operator /= (const Value& val)
Math operator for value (over equal).
Returns:
itself

oValue& operator %= (const Value& val)
Math operator for value (mod equal).
Returns:
itself

oValue& operator |= (const Value& val)
Math operator for value (or equal).
Returns:
itself

oValue& operator &= (const Value& val)
Math operator for value (and equal).
Returns:
itself

oValue& operator ^= (const Value& val)
Math operator for value (xor equal).
Returns:
itself

oValue& operator >>= (const Value& val)
Math operator for value (shift right equal).
Returns:
itself

oValue& operator <<= (const Value& val)
Math operator for value (shift left equal).
Returns:
itself


Direct child classes:
IfoVal
Author:
Written June 2001 by Masahiro Ito and Daniel Sigg
Version:
1.0

Alphabetic index HTML hierarchy of classes or Java


Please send questions and comments to zweizig_j@ligo-wa.caltech.edu