muParserX 2.0.0
Loading...
Searching...
No Matches
mup::IValue Class Referenceabstract

Interface to be implemented by all classes representing values. More...

#include <mpIValue.h>

Inheritance diagram for mup::IValue:
Collaboration diagram for mup::IValue:

Public Member Functions

int GetDim () const
 Returns the dimension of the value represented by a value object.
bool IsNonComplexScalar () const
 Returns true if the type is either floating point or interger.
bool IsScalar () const
 Returns true if the type is not a vector and not a string.
bool IsScalarOrBool () const
 Returns true if this value represents a scalar value or a boolean value.
bool IsInteger () const
 Returns true if this value is a noncomplex integer.
bool IsMatrix () const
 Returns true if this value is an array.
bool IsComplex () const
 Returns true if this value is a complex value.
bool IsString () const
 Returns true if this value is a string value.
Public Member Functions inherited from mup::IToken
ECmdCode GetCode () const
 return the token code.
const string_typeGetIdent () const
 Return the token identifier string.

Friends

std::ostream & operator<< (std::ostream &a_Stream, const IValue &a_Val)
 Overloaded streaming operator for outputting the value type into an std::ostream.

Additional Inherited Members

Protected Member Functions inherited from mup::IToken
virtual ~IToken ()
 Destructor (trivial).
 IToken (const IToken &ref)
 Copy constructor.

Detailed Description

Interface to be implemented by all classes representing values.

IValue is the common base class of both the Value and Variable classes.

Member Function Documentation

◆ GetDim()

int mup::IValue::GetDim ( ) const
inline

Returns the dimension of the value represented by a value object.

The value represents the dimension of the object. Possible value are:

  • 0 - scalar
  • 1 - vector
  • 2 - matrix
Here is the call graph for this function:

◆ IsComplex()

bool mup::IValue::IsComplex ( ) const
inline

Returns true if this value is a complex value.

Exceptions
nothrow

◆ IsInteger()

bool mup::IValue::IsInteger ( ) const
inline

Returns true if this value is a noncomplex integer.

Exceptions
nothrow
Here is the call graph for this function:

◆ IsMatrix()

bool mup::IValue::IsMatrix ( ) const
inline

Returns true if this value is an array.

Exceptions
nothrow

◆ IsNonComplexScalar()

bool mup::IValue::IsNonComplexScalar ( ) const
inline

Returns true if the type is either floating point or interger.

Exceptions
nothrow

◆ IsScalar()

bool mup::IValue::IsScalar ( ) const
inline

Returns true if the type is not a vector and not a string.

Exceptions
nothrow

◆ IsScalarOrBool()

bool mup::IValue::IsScalarOrBool ( ) const
inline

Returns true if this value represents a scalar value or a boolean value.

Added to fix #117

Here is the call graph for this function:

◆ IsString()

bool mup::IValue::IsString ( ) const
inline

Returns true if this value is a string value.

Exceptions
nothrow

◆ operator<<

std::ostream & operator<< ( std::ostream & a_Stream,
const IValue & a_Val )
friend

Overloaded streaming operator for outputting the value type into an std::ostream.

Parameters
a_StreamThe stream object
a_ValThe value object to be streamed

This function is only present if MUP_USE_WIDE_STRING is not defined.


muParserX documentation - (C) 2010 Ingo Berg