Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members | Related Pages

Object Class Reference

Object is the base for every other class used in Fusion content. More...

Inheritance diagram for Object:

Color MFField MFNode Node PlaneProj SFMatrix3D SFURL SFValue Stream Array Date File Math List of all members.

Public Member Functions

FUSION_EXPORT Value eval (const UTF8String &s)
 eval(expression)
Returns the value of the string expression evaluated as a lua expression.
virtual FUSION_EXPORT Fusion::UTF8String join (const Fusion::UTF8String &sep) const
 join all elements in an array from 0 to length-1.
virtual FUSION_EXPORT int push (Args &args)
 place all passed arguments at the end of an array, starting at length.
virtual FUSION_EXPORT void insert (const Value &src, int32_t at)
 insert the passed items before the item at the passed index.
virtual FUSION_EXPORT void remove (int32_t at, double num)
 remove num items at the passed index.
virtual FUSION_EXPORT int splice (Args &args)
 Insert the passed items before the item at start after deleting deleteCount items from start.
FUSION_EXPORT void shuffle (const Value &src, int32_t srcStart, int32_t srcCount, int32_t srcSkip, int32_t dstStart, int32_t dstDeleteCount, int32_t dstSkip, int32_t repeatCount)
 shuffle the passed src elements into the current array:

Classes

class  PropertyIter
 Property iterator class Handy class for iterating over all of the properties of an object. More...

Detailed Description

Object is the base for every other class used in Fusion content.

It contains string-named properties which can hold values of any type.


Member Function Documentation

FUSION_EXPORT Value eval const UTF8String &  s  ) 
 

eval(expression)
Returns the value of the string expression evaluated as a lua expression.

virtual FUSION_EXPORT Fusion::UTF8String join const Fusion::UTF8String &  sep  )  const [virtual]
 

join all elements in an array from 0 to length-1.

If sep is passed it is placed between each element. Otherwise, a comma is used as the separator. If an element is a string, it is surrounded by double quotes.

virtual FUSION_EXPORT void remove int32_t  at,
double  num
[inline, virtual]
 

remove num items at the passed index.

Note: num is passed as a double so we can determine if it was set or not If it is not set, it will be a NaN. If so, we will just delete one item.

FUSION_EXPORT void shuffle const Value &  src,
int32_t  srcStart,
int32_t  srcCount,
int32_t  srcSkip,
int32_t  dstStart,
int32_t  dstDeleteCount,
int32_t  dstSkip,
int32_t  repeatCount
 

shuffle the passed src elements into the current array:

srcStart - first element of src to use srcCount - number of source elements to use in each group srcSkip - number of source elements to skip after each group dstStart - first location of dst array to start inserting src elements dstDeleteCount - number of elements in dst to delete in each group dstSkip - number of dst elements to skip after each group repeatCount - number of times to perform operations on groups

This function combines elements in the src array with the current array. Algorithm starts by deleting dstDeleteCount elements in the current array starting at dstStart. Then srcCount elements from src and starting at srcStart are inserted at dstStart. Then srcStart is updated to be srcCount+srcSkip and dstStart is updated to be dstDeleteCount+dstSkip. Then the process is repeated repeatCount-1 times.

If src is too short it wraps, but it must contain at least one element. If srcStart or dstStart are negative, they are considered to be offsets from the end of their respective arrays rather than from the start. The actual start is obtained from start' = length + start, so a start of -1 means to start at the last item in the array. If these values are beyond the end of the array, a value of 0 is used. If any of the other values are out of range, the algorithm aborts where it left off and the result is returned.


Generated on Sat Apr 1 06:08:10 2006 for Emma Content Development Kit by  doxygen 1.4.3