#include <NTuple.h>
Inheritance diagram for NTuple::_Array< TYP >:
Public Types | |
typedef Range< TYP > | ItemRange |
Set type definition to make life more easy easy. | |
Public Member Functions | |
template<class T> | |
_Array< TYP > & | operator= (const _Array< T > ©) |
Assignment operator. | |
const TYP & | data (long i) const |
Access to data by reference (CONST). | |
TYP & | data (long i) |
Access to data by reference (CONST). | |
virtual void | setDefault (const TYP d)=0 |
Set default value. | |
virtual const ItemRange & | range () const =0 |
Access the range if specified. | |
virtual void | release ()=0 |
Destruct object. | |
virtual const std::type_info & | typeID () const =0 |
Compiler type ID. | |
virtual std::string | typeName () const =0 |
Proper type name of the object. | |
virtual const void * | buffer () const =0 |
Access data buffer (CONST). | |
virtual bool | hasIndex () const =0 |
Is the tuple have an index item? | |
virtual const std::string & | index () const =0 |
Access the index _Item. | |
virtual const std::string & | name () const =0 |
Access _Item name. | |
virtual long | type () const =0 |
Type information of the item. | |
virtual long | length () const =0 |
Access the buffer length. | |
virtual void | reset ()=0 |
Reset column. | |
virtual long | ndim () const =0 |
Dimension. | |
virtual long | dim (long i) const =0 |
Access individual dimensions. | |
virtual long | size () const =0 |
Size of entire object. | |
virtual long | filled () const =0 |
Number of items filled. | |
virtual INTupleItem * | indexItem ()=0 |
Pointer to index column (if present, 0 else). | |
virtual const INTupleItem * | indexItem () const =0 |
Pointer to index column (if present, 0 else) (CONST). | |
virtual INTuple * | tuple ()=0 |
NTuple the item belongs to. | |
Static Public Member Functions | |
static _Array * | create (INTuple *tup, const std::string &name, const std::type_info &info, const std::string &index, long len, TYP min, TYP max, TYP def) |
Create instance. | |
Protected Member Functions | |
virtual void | setType (long typ)=0 |
Set the properties of the INTupleItem. | |
Protected Attributes | |
TYP * | m_buffer |
Pointer to data buffer. |
Definition at line 150 of file NTuple.h.
typedef Range<TYP> NTuple::_Data< TYP >::ItemRange [inherited] |
Set type definition to make life more easy easy.
Reimplemented in NTuple::_DataImp< TYP >, NTuple::_ItemImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_MatrixImp< TYP >.
static _Array* NTuple::_Array< TYP >::create | ( | INTuple * | tup, | |
const std::string & | name, | |||
const std::type_info & | info, | |||
const std::string & | index, | |||
long | len, | |||
TYP | min, | |||
TYP | max, | |||
TYP | def | |||
) | [static] |
Create instance.
_Array<TYP>& NTuple::_Array< TYP >::operator= | ( | const _Array< T > & | copy | ) | [inline] |
Assignment operator.
Definition at line 163 of file NTuple.h.
00163 { 00164 long len = this->length(); 00165 if ( len == copy.length() ) { 00166 const T* source = (const T*)copy.buffer(); 00167 for ( int i = 0; i < len; i++ ) { 00168 *(this->m_buffer + i) = *(source + i); 00169 } 00170 return *this; 00171 } 00172 throw std::out_of_range 00173 ("N-tuple matrix cannot be copied! The index range does not match!"); 00174 return *this; 00175 }
const TYP& NTuple::_Array< TYP >::data | ( | long | i | ) | const [inline] |
TYP& NTuple::_Array< TYP >::data | ( | long | i | ) | [inline] |
virtual void NTuple::_Data< TYP >::setDefault | ( | const TYP | d | ) | [pure virtual, inherited] |
Set default value.
Implemented in NTuple::_DataImp< TYP >, NTuple::_ItemImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_MatrixImp< TYP >.
virtual const ItemRange& NTuple::_Data< TYP >::range | ( | ) | const [pure virtual, inherited] |
Access the range if specified.
Implemented in NTuple::_DataImp< TYP >, NTuple::_ItemImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_MatrixImp< TYP >.
virtual void INTupleItem::setType | ( | long | typ | ) | [protected, pure virtual, inherited] |
virtual void INTupleItem::release | ( | ) | [pure virtual, inherited] |
virtual const std::type_info& INTupleItem::typeID | ( | ) | const [pure virtual, inherited] |
virtual std::string INTupleItem::typeName | ( | ) | const [pure virtual, inherited] |
virtual const void* INTupleItem::buffer | ( | ) | const [pure virtual, inherited] |
virtual bool INTupleItem::hasIndex | ( | ) | const [pure virtual, inherited] |
virtual const std::string& INTupleItem::index | ( | ) | const [pure virtual, inherited] |
virtual const std::string& INTupleItem::name | ( | ) | const [pure virtual, inherited] |
virtual long INTupleItem::type | ( | ) | const [pure virtual, inherited] |
virtual long INTupleItem::length | ( | ) | const [pure virtual, inherited] |
virtual void INTupleItem::reset | ( | ) | [pure virtual, inherited] |
virtual long INTupleItem::ndim | ( | ) | const [pure virtual, inherited] |
Dimension.
Implemented in NTuple::_DataImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_MatrixImp< TYP >.
virtual long INTupleItem::dim | ( | long | i | ) | const [pure virtual, inherited] |
Access individual dimensions.
Implemented in NTuple::_DataImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_MatrixImp< TYP >.
virtual long INTupleItem::size | ( | ) | const [pure virtual, inherited] |
Size of entire object.
Implemented in NTuple::_DataImp< TYP >, NTuple::_ItemImp< TYP >, NTuple::_ArrayImp< TYP >, and NTuple::_MatrixImp< TYP >.
virtual long INTupleItem::filled | ( | ) | const [pure virtual, inherited] |
virtual INTupleItem* INTupleItem::indexItem | ( | ) | [pure virtual, inherited] |
virtual const INTupleItem* INTupleItem::indexItem | ( | ) | const [pure virtual, inherited] |
virtual INTuple* INTupleItem::tuple | ( | ) | [pure virtual, inherited] |
TYP* NTuple::_Data< TYP >::m_buffer [protected, inherited] |