cube_ptrs< glue_type, T1 > Struct Template Reference
[Glue_cube_metaprog]

Template metaprogram cube_ptrs fills a given array with addresses of cubes from a recursive instance of GlueCube<Tx,Ty, glue_cube_type>. While parsing the recursive instance, if encountered objects are of type OpCube<..>, they are converted to type 'Cube' first. More...

#include <glue_cube_metaprog.hpp>

List of all members.

Public Types

typedef T1::elem_type elem_type

Static Public Member Functions

static void get_ptrs (const Cube< elem_type > **ptrs, bool *del, const T1 &X)

Static Public Attributes

static const u32 num = 0

Detailed Description

template<typename glue_type, typename T1>
struct cube_ptrs< glue_type, T1 >

Template metaprogram cube_ptrs fills a given array with addresses of cubes from a recursive instance of GlueCube<Tx,Ty, glue_cube_type>. While parsing the recursive instance, if encountered objects are of type OpCube<..>, they are converted to type 'Cube' first.

Definition at line 47 of file glue_cube_metaprog.hpp.


Member Typedef Documentation

template<typename glue_type, typename T1>
typedef T1::elem_type cube_ptrs< glue_type, T1 >::elem_type

Definition at line 49 of file glue_cube_metaprog.hpp.


Member Function Documentation

template<typename glue_type, typename T1>
static void cube_ptrs< glue_type, T1 >::get_ptrs ( const Cube< elem_type > **  ptrs,
bool *  del,
const T1 &  X 
) [inline, static]

Definition at line 57 of file glue_cube_metaprog.hpp.

Referenced by cube_ptrs< glue_type, GlueCube< T1, T2, glue_type > >::get_ptrs().

00062     {
00063     ptrs[0] = 
00064       (
00065       is_Cube<T1>::value ?
00066         reinterpret_cast<const Cube<elem_type>*>(&X)
00067       :
00068         new Cube<elem_type>(X)
00069       );
00070 
00071     del[0] = 
00072       (
00073       is_Cube<T1>::value ?
00074         false
00075       :
00076         true
00077       );
00078 
00079     
00080     }


Member Data Documentation

template<typename glue_type, typename T1>
const u32 cube_ptrs< glue_type, T1 >::num = 0 [static]