# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

NLAIAGENT::CIndexVariant Class Template Reference

This class is a basic hi nomber manipulation. More...

#include <ident.h>

List of all members.

Public Methods

 CIndexVariant (const CIndexVariant< T, indexMax, maxT > &a)
 Copy contructor. More...

 CIndexVariant (const T *id)
 fill with a table. More...

 CIndexVariant (T n)
 Initializ by an value. More...

 CIndexVariant (NLMISC::IStream &is)
 fill from read stream. More...

const CIndexVariant & operator++ (int)
 throw (NLAIE::CExceptionIndexError). More...

void save (NLMISC::IStream &os)
 saving the nomber in an output stream. More...

void load (NLMISC::IStream &is)
 loading the nomber from an input stream. More...

void getDebugString (std::string &str) const
 Have a debug string. More...

sint32 getMaxIndex () const
comparison of two CIndexVariant.
bool operator== (const CIndexVariant< T, indexMax, maxT > &a) const
bool operator< (const CIndexVariant< T, indexMax, maxT > &a) const
bool operator> (const CIndexVariant< T, indexMax, maxT > &a) const
Binary method.
const CIndexVariant< T, indexMax,
maxT > & 
operator|= (const CIndexVariant< T, indexMax, maxT > &a)
const CIndexVariant< T, indexMax,
maxT > & 
operator &= (const CIndexVariant< T, indexMax, maxT > &a)
const CIndexVariant< T, indexMax,
maxT > & 
operator^= (const CIndexVariant< T, indexMax, maxT > &a)
Assignment method.
const CIndexVariant< T, indexMax,
maxT > & 
operator= (const CIndexVariant< T, indexMax, maxT > &a)
const CIndexVariant< T, indexMax,
maxT > & 
operator= (T a)
const CIndexVariant< T, indexMax,
maxT > & 
operator>>= (sint a)
const CIndexVariant< T, indexMax,
maxT > & 
operator<<= (sint a)

Protected Attributes

_Id [indexMax]
 _Id is a table were is store the number. More...


Private Methods

void inc (int n)
 throw (NLAIE::CExceptionIndexError). More...


Detailed Description

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
class NLAIAGENT::CIndexVariant< T, indexMax, maxT >

This class is a basic hi nomber manipulation.

An index variant is an maxIndex*64 bit number.

The resolution of the number is define by the template argument indexMax. By default the number is initialed with a 128 bits resolution.

Author:
Chafik sameh , Robert Gabriel , Nevrax France
Date:
2000

Definition at line 51 of file ident.h.


Constructor & Destructor Documentation

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
NLAIAGENT::CIndexVariant< T, indexMax, maxT >::CIndexVariant const CIndexVariant< T, indexMax, maxT > &    a [inline]
 

Copy contructor.

Definition at line 84 of file ident.h.

References _Id, and getMaxIndex.

Referenced by operator++.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
NLAIAGENT::CIndexVariant< T, indexMax, maxT >::CIndexVariant const T *    id [inline]
 

fill with a table.

Definition at line 90 of file ident.h.

References _Id, getMaxIndex, and id.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
NLAIAGENT::CIndexVariant< T, indexMax, maxT >::CIndexVariant   n [inline]
 

Initializ by an value.

Definition at line 99 of file ident.h.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
NLAIAGENT::CIndexVariant< T, indexMax, maxT >::CIndexVariant NLMISC::IStream   is [inline]
 

fill from read stream.

Definition at line 110 of file ident.h.

References load.


Member Function Documentation

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
void NLAIAGENT::CIndexVariant< T, indexMax, maxT >::getDebugString std::string &    str const [inline]
 

Have a debug string.

Definition at line 288 of file ident.h.

References _Id, getMaxIndex, and s.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
sint32 NLAIAGENT::CIndexVariant< T, indexMax, maxT >::getMaxIndex   const [inline]
 

Definition at line 312 of file ident.h.

Referenced by CIndexVariant, getDebugString, inc, load, operator &=, operator<<=, operator=, operator==, operator>>=, operator^=, operator|=, and save.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
void NLAIAGENT::CIndexVariant< T, indexMax, maxT >::inc int    n [inline, private]
 

throw (NLAIE::CExceptionIndexError).

It's call from the ++ operator. If the number id overflow the NLAIE::CExceptionIndexError is emited.

Parameters:
n  The first index to increment.

Definition at line 64 of file ident.h.

References _Id, and getMaxIndex.

Referenced by operator++.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
void NLAIAGENT::CIndexVariant< T, indexMax, maxT >::load NLMISC::IStream   is [inline]
 

loading the nomber from an input stream.

Definition at line 267 of file ident.h.

References _Id, getMaxIndex, num, and NLMISC::IStream::serial.

Referenced by CIndexVariant.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator &= const CIndexVariant< T, indexMax, maxT > &    a [inline]
 

Definition at line 171 of file ident.h.

References _Id, and getMaxIndex.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator++ int    [inline]
 

throw (NLAIE::CExceptionIndexError).

Definition at line 116 of file ident.h.

References CIndexVariant, and inc.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
bool NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator< const CIndexVariant< T, indexMax, maxT > &    a const [inline]
 

Definition at line 141 of file ident.h.

References _Id.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator<<= sint    a [inline]
 

Definition at line 229 of file ident.h.

References _Id, getMaxIndex, and r.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator=   a [inline]
 

Definition at line 201 of file ident.h.

References _Id, and getMaxIndex.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator= const CIndexVariant< T, indexMax, maxT > &    a [inline]
 

Definition at line 192 of file ident.h.

References _Id, and getMaxIndex.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
bool NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator== const CIndexVariant< T, indexMax, maxT > &    a const [inline]
 

Definition at line 131 of file ident.h.

References _Id, and getMaxIndex.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
bool NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator> const CIndexVariant< T, indexMax, maxT > &    a const [inline]
 

Definition at line 150 of file ident.h.

References _Id.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator>>= sint    a [inline]
 

Definition at line 208 of file ident.h.

References _Id, getMaxIndex, and r.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator^= const CIndexVariant< T, indexMax, maxT > &    a [inline]
 

Definition at line 180 of file ident.h.

References _Id, and getMaxIndex.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
const CIndexVariant<T,indexMax,maxT>& NLAIAGENT::CIndexVariant< T, indexMax, maxT >::operator|= const CIndexVariant< T, indexMax, maxT > &    a [inline]
 

Definition at line 163 of file ident.h.

References _Id, and getMaxIndex.

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
void NLAIAGENT::CIndexVariant< T, indexMax, maxT >::save NLMISC::IStream   os [inline]
 

saving the nomber in an output stream.

Definition at line 254 of file ident.h.

References _Id, getMaxIndex, and NLMISC::IStream::serial.


Member Data Documentation

template<class T = sint64, sint32 indexMax = maxIndex, T maxT = (T)-1>
T NLAIAGENT::CIndexVariant::_Id[indexMax] [protected]
 

_Id is a table were is store the number.

Definition at line 55 of file ident.h.

Referenced by CIndexVariant, getDebugString, inc, load, operator &=, operator<, operator<<=, operator=, operator==, operator>, operator>>=, operator^=, operator|=, and save.


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