This is the documentation for Enlighten.

module Containers

Classes

Name Description
Geo::ArrayRange

A range within an array [first, last).

Geo::FixedSizeArray

A fixed size array.

Geo::GeoAllocationPage

A storage unit for a page based allocation system.

Geo::GeoAllocator

A type of std::allocator, that passes memory requests through to the Geo heap functions This is used as the default allocator argument for the STL-like GeoMap/GeoList containers.

Geo::GeoAllocatorUnchecked

A custom std::allocator, that uses simple malloc/free.

Geo::GeoArray

Basic templated dynamic array class.

Geo::GeoArray_Stl

STL adaptor to make the GeoArray look like a proper STL container.

Geo::GeoAutoDeleteArray

Adaptor to allow storing of pointers in a container (calls GEO_DELETE on each pointer upon array destruction)

Geo::GeoAutoDeleteList

Adaptor to allow container to own the pointed-to value data (calls GEO_DELETE() on each pointer upon container destruction)

Geo::GeoAutoDeleteMap

Adaptor to allow container to own the pointed-to value data (calls GEO_DELETE() on each pointer upon container destruction)

Geo::GeoAutoReleaseArray

Adaptor to allow storing of IGeoReleasable pointers in a container (calls Release() on each pointer upon array destruction)

Geo::GeoAutoReleaseMap

Adaptor to allow container to own the pointed-to value data (calls Release() on each pointer upon container destruction)

Geo::GeoBitStore

Container for a set of bits.

Geo::GeoBitStore::const_iterator

iterator to a nonmodifiable GeoBitStore, allows reading data by the operator*()

Geo::GeoEqualCString

A hash functor for a null-terminated string.

Geo::GeoFixedPoolAllocator

A std::allocator that passes memory requests through to a single underlying GeoAllocationPage.

Geo::GeoFixedPoolList

To make usage of this pool class a bit less painful, create template holding classes for typedefs; since template typedefs do not exist, this is the closest you can get.

Geo::GeoFixedPoolMap

To make usage of this pool class a bit less painful, create template holding classes for typedefs; since template typedefs do not exist, this is the closest you can get.

Geo::GeoGenericTexture

A really simple texture where all elements are T.

Geo::GeoHashConstHandle

A const handle into the hash table.

Geo::GeoHashCString

A hash functor for a null-terminated string.

Geo::GeoHashDefault

A generic hashing functor.

Geo::GeoHashHandle

A non-const handle into the hash table.

Geo::GeoHashMap

The hash table.

Geo::GeoHashString

A functor which hashes a char string.

Geo::GeoImmutableArray

Basic templated dynamic immutable array class.

Geo::GeoKeyValueArray

A fast implementation of a set associative container, this one using a sorted array of key values to lookup a similar array of value pointers.

Geo::GeoList

Our implementation of an STL list, with some modifications.

Geo::GeoList::const_iterator

Iterator for nonmutable GeoList.

Geo::GeoList::iterator

Iterator for mutable GeoList.

Geo::GeoMap

Our implementation of an STL map, with some modifications.

Geo::GeoMap::const_iterator

Iterator for nonmutable GeoMap.

Geo::GeoMap::iterator

Iterator for mutable GeoMap.

Geo::GeoPair

A generic pair class. Inherits things like CopyConstructible or Assignable from its argument types.

Geo::GeoPriorityQueue

GeoPriorityQueue.

Geo::GeoQueue

Simple FIFO queue.

Geo::GeoQueueEnumInterface

Any class which wishes to use the queue Walk function must inherit from this class to define its callback interface.

Geo::GeoTriple

A generic triple class. Inherits things like CopyConstructible or Assignable from its argument types.

Geo::GeoV128Texture

A really simple texture where all elements are float vectors.

Geo::IdentDataCompare

Comparison class for std::sort.

Geo::OptionalIndex

An index value that may or may not be present.

Geo::StridedArrayView

A read-only view into an array with optional stride.

Geo::TextureWriter

Class that writes a 2D block of memory to disk as a texture file.

Geo::TreeNode

A generic tree structure, where each node contains an item by value.

Geo::TypeInfo

Provides a type id for the given type.

Functions

Name Description
begin(ArrayRange< T > &)

Return iterator to support ranged-based for loop.

begin(const ArrayRange< T > &)

Return iterator to support ranged-based for loop.

Clear()

Removes all entries from the collection. Remember, this object did not take ownership.

Copy(const GeoList< T > &, GeoList< T > &)

Appends the contents of the 'source' GeoList to the 'dest' GeoList.

end(ArrayRange< T > &)

Return iterator to support ranged-based for loop.

end(const ArrayRange< T > &)

Return iterator to support ranged-based for loop.

Find(const TKey &)

Find a value in the collection with TKey key.

FindIndex(const GeoArray< T > &, const T &)

Find array index for first element that matches data, returns -1 if no match.

FindIndex(const TKey &)

Find the index of a given key.

Insert(const TKey &, TValue *)

Insert an pointer to a TValue item into the container.

MakeArrayRange(T *, T *)

Returns an array range for first and last.

MakeGeoArray(StridedArrayView< T >)

Create a GeoArray which is a copy of the specified strided array view.

MakeGeoArray(const T *, s32)

Create a GeoArray which is a copy of the specified array.

MakeGeoPair(const T1 &, const T2 &)

Function to create a Geo::GeoPair, similar to the STL function std::make_pair.

MakeGeoTriple(const T1 &, const T2 &, const T3 &)

Function to create a Geo::GeoTriple, extended from MakeGeoPair.

MakeStridedArrayView(const GeoArray< T > &)

Create a StridedArrayView which refers to the entire of the specified array.

MakeStridedArrayView(const T *, Geo::s32, Geo::s32)

Create a read-only view into an array with optional stride.

operator!=(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator!=(const GeoAllocatorUnchecked< T1 > &, const GeoAllocatorUnchecked< T2 > &)

Comparison operators for allocator classes.

operator!=(const GeoAllocator< T1 > &, const GeoAllocator< T2 > &)

Comparison operators for allocator classes.

operator!=(const GeoFixedPoolAllocator< T1 > &, const GeoFixedPoolAllocator< T2 > &)

Comparison operators for allocator classes.

operator<(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator<=(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator==(const GeoArray< T > &, const GeoArray< T > &)

Array equality testing function.

operator==(const GeoAllocator< T1 > &, const GeoAllocator< T2 > &)

Comparison operators for allocator classes.

operator==(const GeoFixedPoolAllocator< T1 > &, const GeoFixedPoolAllocator< T2 > &)

Comparison operators for allocator classes.

operator==(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator==(const GeoAllocatorUnchecked< T1 > &, const GeoAllocatorUnchecked< T2 > &)

Comparison operators for allocator classes.

operator>(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

operator>=(const GeoList< _Ty, _Alloc > &, const GeoList< _Ty, _Alloc > &)

Operator overloads for GeoList.

Remove(const TKey &, s32 &)

Remove the entry referenced to by key.

RemoveIndex(s32)

Remove the entry referenced by index obtained by FindIndex (note that all indices are of course invalidated).

SafeDestructArrayContents(Geo::GeoArray< tType * > &, tTypeDestructor)

Given a GeoArray of pointers, and a destruct function (or any type that has operator()), destroy the elements and clear the array.

swap(GeoList< _Ty, _Alloc > &, GeoList< _Ty, _Alloc > &)

Optimised std::swap compatible function.

swap(GeoMap< _Kty, _Ty, _Pr, _Alloc > &, GeoMap< _Kty, _Ty, _Pr, _Alloc > &)

Optimised std::swap compatible function.

Typedefs

Name Description
const Impl::Empty * TypeId

A value that uniquely identifies a type within a single executable or dynamic library.


T* Geo::begin


public: T * begin
(
    ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


const T* Geo::begin


public: const T * begin
(
    const ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


void Geo::GeoKeyValueArray< TKey, TValue >::Clear


public: void Clear()


Removes all entries from the collection. Remember, this object did not take ownership.


bool Geo::Copy


public: bool Copy
(
    const GeoList< T > & source,
    GeoList< T > & dest
)


Appends the contents of the 'source' GeoList to the 'dest' GeoList.


T* Geo::end


public: T * end
(
    ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


const T* Geo::end


public: const T * end
(
    const ArrayRange< T > & a
)


Return iterator to support ranged-based for loop.


TValue * Geo::GeoKeyValueArray< TKey, TValue >::Find


public: TValue * Find
(
    const TKey & key
) const


Find a value in the collection with TKey key.

O(logN) operation.

Returns

NULL on failure.


Geo::s32 Geo::FindIndex


public: Geo::s32 FindIndex
(
    const GeoArray< T > & lhs,
    const T & data
)


Find array index for first element that matches data, returns -1 if no match.

This requires T to implement operator == (const T& rhs) const.

Note

Make sure your operator == is a const function!


s32 Geo::GeoKeyValueArray< TKey, TValue >::FindIndex


public: s32 FindIndex
(
    const TKey & key
) const


Find the index of a given key.

O(logN) operation.

Returns

-1 on failure.


s32 Geo::GeoKeyValueArray< TKey, TValue >::Insert


public: s32 Insert
(
    const TKey & key,
    TValue * value
)


Insert an pointer to a TValue item into the container.

O(logN) operation.

Returns

-1 on failure.


GEO_FORCE_INLINE ArrayRange<T> Geo::MakeArrayRange


public: GEO_FORCE_INLINE ArrayRange< T > MakeArrayRange
(
    T * first,
    T * last
)


Returns an array range for first and last.


GeoArray<T> Geo::MakeGeoArray


public: GeoArray< T > MakeGeoArray
(
    StridedArrayView< T > a
)


Create a GeoArray which is a copy of the specified strided array view.


GeoArray<T> Geo::MakeGeoArray


public: GeoArray< T > MakeGeoArray
(
    const T * p,
    s32 n
)


Create a GeoArray which is a copy of the specified array.


GeoPair<T1, T2> Geo::MakeGeoPair


public: GeoPair< T1, T2 > MakeGeoPair
(
    const T1 & t1,
    const T2 & t2
)


Function to create a Geo::GeoPair, similar to the STL function std::make_pair.


GeoTriple<T1, T2, T3> Geo::MakeGeoTriple


public: GeoTriple< T1, T2, T3 > MakeGeoTriple
(
    const T1 & t1,
    const T2 & t2,
    const T3 & t3
)


Function to create a Geo::GeoTriple, extended from MakeGeoPair.


StridedArrayView<T> Geo::MakeStridedArrayView


public: StridedArrayView< T > MakeStridedArrayView
(
    const GeoArray< T > & a
)


Create a StridedArrayView which refers to the entire of the specified array.


StridedArrayView<T> Geo::MakeStridedArrayView


public: StridedArrayView< T > MakeStridedArrayView
(
    const T * first,
    Geo::s32 count,
    Geo::s32 stride
)


Create a read-only view into an array with optional stride.


bool Geo::operator!=


public: bool operator!=
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator!=


public: bool operator!=
(
    const GeoAllocatorUnchecked< T1 > & ,
    const GeoAllocatorUnchecked< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator!=


public: bool operator!=
(
    const GeoAllocator< T1 > & ,
    const GeoAllocator< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator!=


public: bool operator!=
(
    const GeoFixedPoolAllocator< T1 > & lhs,
    const GeoFixedPoolAllocator< T2 > & rhs
)


Comparison operators for allocator classes.


bool Geo::operator<


public: bool operator<
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator<=


public: bool operator<=
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator==


public: bool operator==
(
    const GeoArray< T > & lhs,
    const GeoArray< T > & rhs
)


Array equality testing function.

This requires T to implement operator == (const T& rhs) const.

Note

Make sure your operator == is a const function!


bool Geo::operator==


public: bool operator==
(
    const GeoAllocator< T1 > & ,
    const GeoAllocator< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator==


public: bool operator==
(
    const GeoFixedPoolAllocator< T1 > & lhs,
    const GeoFixedPoolAllocator< T2 > & rhs
)


Comparison operators for allocator classes.


bool Geo::operator==


public: bool operator==
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator==


public: bool operator==
(
    const GeoAllocatorUnchecked< T1 > & ,
    const GeoAllocatorUnchecked< T2 > &
)


Comparison operators for allocator classes.


bool Geo::operator>


public: bool operator>
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


bool Geo::operator>=


public: bool operator>=
(
    const GeoList< _Ty, _Alloc > & _Left,
    const GeoList< _Ty, _Alloc > & _Right
)


Operator overloads for GeoList.


TValue * Geo::GeoKeyValueArray< TKey, TValue >::Remove


public: TValue * Remove
(
    const TKey & key,
    s32 & removedIndex
)


Remove the entry referenced to by key.

removedIndex will be filled by previous index value (note that all indices are of course invalidated).

Returns

NULL if not found in collection, otherwise the value object.


TValue * Geo::GeoKeyValueArray< TKey, TValue >::RemoveIndex


public: TValue * RemoveIndex
(
    s32 index
)


Remove the entry referenced by index obtained by FindIndex (note that all indices are of course invalidated).

Returns

NULL if not found in collection, otherwise the value object.


void Geo::SafeDestructArrayContents


public: void SafeDestructArrayContents
(
    Geo::GeoArray< tType * > & a,
    tTypeDestructor safeDestruct
)


Given a GeoArray of pointers, and a destruct function (or any type that has operator()), destroy the elements and clear the array.

For some irritating reason, you may need to help the compiler infer the template type of the destructor. For example:

SafeDestructArrayContents(m_RadCores, DeleteRadSystemCore);
SafeDestructArrayContents(m_InputWorkspaces, DeleteInputWorkspace);
SafeDestructArrayContents(m_SolverProperties, SafeRelease<BakeInputProperties*>);
SafeDestructArrayContents(m_s32Array, GEO_DELETE_T<s32>);
SafeDestructArrayContents(m_s32BufferArray, GEO_DELETE_ARRAY_T<s32>);


void Geo::swap


public: void swap
(
    GeoList< _Ty, _Alloc > & _Left,
    GeoList< _Ty, _Alloc > & _Right
)


Optimised std::swap compatible function.


void Geo::swap


public: void swap
(
    GeoMap< _Kty, _Ty, _Pr, _Alloc > & lhs,
    GeoMap< _Kty, _Ty, _Pr, _Alloc > & rhs
)


Optimised std::swap compatible function.