rasdaman client API  10.6.3
The Array Analytics Engine: Datacubes at Your Fingertips
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
r_Flat_Base_Type Class Reference

This class can be used to get a more convenient view on a structured base type. More...

#include <flatbasetype.hh>

Public Member Functions

 r_Flat_Base_Type (void)
 default constructor, shouldn't be used More...
 
 r_Flat_Base_Type (const r_Base_Type *type)
 constructor receiving the (hierarchical) base type More...
 
 r_Flat_Base_Type (const r_Flat_Base_Type &src)
 copy constructor More...
 
 ~r_Flat_Base_Type (void)
 destructor More...
 
unsigned int get_num_types (void) const
 return number of primitive types More...
 
const r_Primitive_Typetype (unsigned int num) const
 return pointer to primitive type num index violation is thrown if higher index is requested than available More...
 
const r_Primitive_Typeoperator[] (unsigned int num) const
 operator returns pointer to primitive type num or NULL if invalid index violation is thrown if higher index is requested than available More...
 
unsigned int offset (unsigned int num) const
 return offset of primitive type num index violation is thrown if higher index is requested than available More...
 
r_Bytes size (void) const
 return size of entire type More...
 
r_Flat_Base_Typeoperator= (const r_Flat_Base_Type &src)
 assignment of another flat type More...
 
r_Flat_Base_Typeoperator= (const r_Base_Type *type)
 assignment of a base type More...
 
bool operator== (const r_Flat_Base_Type &src) const
 equality More...
 
void print_status (std::ostream &str) const
 print status to a stream More...
 

Protected Member Functions

void init_shared (void)
 shared init code More...
 
void process_type (const r_Base_Type *type)
 process a base type More...
 
void copy_flat_type (const r_Flat_Base_Type &type)
 copy another flat type More...
 
void free_type_data (void)
 free type-specific data (destructor, assignment) More...
 
unsigned int parse_structure_type (const r_Structure_Type *type, unsigned int number, unsigned int offset)
 parse a structure type and return number of primitive types contained therein More...
 
void parse_primitive_type (r_Primitive_Type *type, unsigned int number, unsigned int offset)
 parse a primitive type More...
 

Protected Attributes

unsigned int numPrimTypes
 the number of primitive types More...
 
r_Bytes typeSize
 the total size of the entire type More...
 
r_Primitive_Type ** primTypes
 the primitive types More...
 
unsigned int * offsets
 the corresponding offsets More...
 

Detailed Description

This class can be used to get a more convenient view on a structured base type.

It eliminates all hierarchies and gives you the primitive types only which can be iterated over with a normal linear loop. Used in e.g. the compression module. Note that this is not a regular member of the r_Type hierarchy!

Constructor & Destructor Documentation

◆ r_Flat_Base_Type() [1/3]

r_Flat_Base_Type::r_Flat_Base_Type ( void  )

default constructor, shouldn't be used

◆ r_Flat_Base_Type() [2/3]

r_Flat_Base_Type::r_Flat_Base_Type ( const r_Base_Type type)
explicit

constructor receiving the (hierarchical) base type

◆ r_Flat_Base_Type() [3/3]

r_Flat_Base_Type::r_Flat_Base_Type ( const r_Flat_Base_Type src)

copy constructor

◆ ~r_Flat_Base_Type()

r_Flat_Base_Type::~r_Flat_Base_Type ( void  )

destructor

Member Function Documentation

◆ copy_flat_type()

void r_Flat_Base_Type::copy_flat_type ( const r_Flat_Base_Type type)
protected

copy another flat type

◆ free_type_data()

void r_Flat_Base_Type::free_type_data ( void  )
protected

free type-specific data (destructor, assignment)

◆ get_num_types()

unsigned int r_Flat_Base_Type::get_num_types ( void  ) const

return number of primitive types

◆ init_shared()

void r_Flat_Base_Type::init_shared ( void  )
protected

shared init code

◆ offset()

unsigned int r_Flat_Base_Type::offset ( unsigned int  num) const

return offset of primitive type num index violation is thrown if higher index is requested than available

◆ operator=() [1/2]

r_Flat_Base_Type& r_Flat_Base_Type::operator= ( const r_Base_Type type)

assignment of a base type

◆ operator=() [2/2]

r_Flat_Base_Type& r_Flat_Base_Type::operator= ( const r_Flat_Base_Type src)

assignment of another flat type

◆ operator==()

bool r_Flat_Base_Type::operator== ( const r_Flat_Base_Type src) const

equality

◆ operator[]()

const r_Primitive_Type* r_Flat_Base_Type::operator[] ( unsigned int  num) const

operator returns pointer to primitive type num or NULL if invalid index violation is thrown if higher index is requested than available

◆ parse_primitive_type()

void r_Flat_Base_Type::parse_primitive_type ( r_Primitive_Type type,
unsigned int  number,
unsigned int  offset 
)
protected

parse a primitive type

◆ parse_structure_type()

unsigned int r_Flat_Base_Type::parse_structure_type ( const r_Structure_Type type,
unsigned int  number,
unsigned int  offset 
)
protected

parse a structure type and return number of primitive types contained therein

◆ print_status()

void r_Flat_Base_Type::print_status ( std::ostream &  str) const

print status to a stream

◆ process_type()

void r_Flat_Base_Type::process_type ( const r_Base_Type type)
protected

process a base type

◆ size()

r_Bytes r_Flat_Base_Type::size ( void  ) const

return size of entire type

◆ type()

const r_Primitive_Type* r_Flat_Base_Type::type ( unsigned int  num) const

return pointer to primitive type num index violation is thrown if higher index is requested than available

Member Data Documentation

◆ numPrimTypes

unsigned int r_Flat_Base_Type::numPrimTypes
protected

the number of primitive types

◆ offsets

unsigned int* r_Flat_Base_Type::offsets
protected

the corresponding offsets

◆ primTypes

r_Primitive_Type** r_Flat_Base_Type::primTypes
protected

the primitive types

◆ typeSize

r_Bytes r_Flat_Base_Type::typeSize
protected

the total size of the entire type


The documentation for this class was generated from the following file: