Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

skRValue Class Reference

This class is used to hold the value of a variable in Simkin. More...

#include <skRValue.h>

List of all members.

Public Types

enum  RType
 An RValue has a value of one of these types: Executable object, String, integer, float or character.


Public Member Functions

 skRValue ()
 Default Constructor - creates a blank string object.

 skRValue (const skRValue &)
 Copy Constructor - copies type and value from the other object.

 skRValue (skiExecutable *object, bool created=false)
 Constructor with an executable object.

void assignObject (skiExecutable *object, bool created=false)
 Assign an executable object.

 skRValue (const skString &s)
 Constructor with a string.

 skRValue (Char c)
 Constructor with a character.

 skRValue (int n)
 Constructor with an integer.

 skRValue (unsigned int n)
 Constructor with an unsigned integer.

 skRValue (float f)
 Constructor with a float.

 skRValue (bool b)
 Constructor with a boolean value.

virtual ~skRValue ()
 Destructor - will delete an associated object if the created flag is set in constructor.

skRValue & operator= (const skRValue &v)
 Assigment operator - clears this value, and then assigns type and value.

skRValue & operator= (bool value)
 Assigment operator - clears this value, and then assigns boolean value.

skRValue & operator= (const skString &value)
 Assigment operator - clears this value, and then assigns string value.

skRValue & operator= (int value)
 Assigment operator - clears this value, and then assigns integer value.

skRValue & operator= (float value)
 Assigment operator - clears this value, and then assigns float value.

skRValue & operator= (Char value)
 Assigment operator - clears this value, and then assigns character value.

bool operator== (const skRValue &)
 returns true if the other value is equal to this one.

Char charValue () const
 returns a character representation of the value, converting if necessary

bool boolValue () const
 returns a boolean representation of the value, converting if necessary

int intValue () const
 returns an integer representation of the value, converting if necessary

float floatValue () const
 returns a float representation of the value, converting if necessary

skString str () const
 returns a string representation of the value, converting if necessary

skiExecutableobj () const
 returns the object associated with this RValue, or 0 if there is none

RType type () const
 returns the type of the value held in this RValue - one of the enumerated RType


Detailed Description

This class is used to hold the value of a variable in Simkin.

It can hold reference counts for objects and delete them when these reach zero.


Constructor & Destructor Documentation

skRValue::skRValue skiExecutable object,
bool  created = false
[inline]
 

Constructor with an executable object.

Remarks:
only available in Symbian version
Parameters:
object - the object to be associated with the RValue
created - set this to true if you want the object to be deleted once all references have reached zero

skRValue::skRValue bool  b  )  [inline]
 

Constructor with a boolean value.

Remarks:
not available in Symbian version


Member Function Documentation

void skRValue::assignObject skiExecutable object,
bool  created = false
[inline]
 

Assign an executable object.

Parameters:
object - the object to be associated with the RValue
created - set this to true if you want the object to be deleted once all references have reached zero
Exceptions:
Symbian - a leaving function

bool skRValue::operator== const skRValue &   ) 
 

returns true if the other value is equal to this one.

Comparison depends on the types held in each value.


The documentation for this class was generated from the following files:
Generated on Fri Dec 17 20:27:35 2004 for Simkin by doxygen1.3