The Utilities.
[The Libecs library]

Collaboration diagram for The Utilities.:

Utilities. More...

Files

file  Util.hpp

Classes

struct  libecs::Type2Type< T >
 Converts each type into a unique, insipid type. More...
struct  libecs::PtrGreater< T >
struct  libecs::PtrLess< T >
class  libecs::StaticCaster< NEW, GIVEN >
class  libecs::DynamicCaster< NEW, GIVEN >
class  libecs::LexicalCaster< NEW, GIVEN >
class  libecs::NumericCaster< NEW, GIVEN >

Defines

#define __STRINGCAST_SPECIALIZATION_DECL(NEW, GIVEN)   template<> ECELL_API const NEW stringCast<NEW,GIVEN>( const GIVEN& )
#define FOR_ALL(SEQCLASS, SEQ)
 Form a 'for' loop over a STL sequence.
#define FOR_ALL_SECOND(SEQCLASS, SEQ, METHOD)
 For each 'second' member of element in a sequence, call a given method.

Functions

template<typename NEW, typename GIVEN>
const NEW libecs::stringCast (const GIVEN &aValue)
 

For internal use only.


 libecs::__STRINGCAST_SPECIALIZATION_DECL (String, Real)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (String, HighReal)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (String, Integer)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (String, UnsignedInteger)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (Real, String)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (HighReal, String)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (Integer, String)
 libecs::__STRINGCAST_SPECIALIZATION_DECL (UnsignedInteger, String)
void libecs::eraseWhiteSpaces (StringRef str)
 Erase white space characters ( ' ', '', and '
' ) from a string.
template<class Sequence>
void libecs::checkSequenceSize (const Sequence &aSequence, const typename Sequence::size_type aMin, const typename Sequence::size_type aMax)
 Check if aSequence's size() is within [ aMin, aMax ].
template<class Sequence>
void libecs::checkSequenceSize (const Sequence &aSequence, const typename Sequence::size_type aMin)
 Check if aSequence's size() is at least aMin.
void libecs::throwSequenceSizeError (const int aSize, const int aMin, const int aMax)
 

For internal use only.


ECELL_API void libecs::throwSequenceSizeError (const int aSize, const int aMin)
 

For internal use only.


template<typename T>
Real libecs::real_not (T n)
 These functions are prepared for ExpressionFluxProcess and are used in it.
template<typename T>
Real libecs::real_eq (T n1, T n2)
template<typename T>
Real libecs::real_neq (T n1, T n2)
template<typename T>
Real libecs::real_gt (T n1, T n2)
template<typename T>
Real libecs::real_lt (T n1, T n2)
template<typename T>
Real libecs::real_geq (T n1, T n2)
template<typename T>
Real libecs::real_leq (T n1, T n2)
template<typename T>
Real libecs::real_and (T n1, T n2)
template<typename T>
Real libecs::real_or (T n1, T n2)
template<typename T>
Real libecs::real_xor (T n1, T n2)
template<typename T>
libecs::asinh (T n)
template<typename T>
libecs::acosh (T n)
template<typename T>
libecs::atanh (T n)
template<typename T>
libecs::sec (T n)
template<typename T>
libecs::csc (T n)
template<typename T>
libecs::cot (T n)
template<typename T>
libecs::asec (T n)
template<typename T>
libecs::acsc (T n)
template<typename T>
libecs::acot (T n)
template<typename T>
libecs::sech (T n)
template<typename T>
libecs::csch (T n)
template<typename T>
libecs::coth (T n)
template<typename T>
libecs::asech (T n)
template<typename T>
libecs::acsch (T n)
template<typename T>
libecs::acoth (T n)
template<typename T>
libecs::fact (T n)
const Polymorph libecs::convertStringMapToPolymorph (StringMapCref aMap)

Detailed Description

Utilities.


Define Documentation

#define FOR_ALL ( SEQCLASS,
SEQ   ) 

Value:

for( SEQCLASS ::const_iterator i( (SEQ) .begin() ) ;\
      i != (SEQ) .end() ; ++i )
Form a 'for' loop over a STL sequence.

Use this like:

FOR_ALL( std::vector<int>, anIntVector ) { int anInt( *i ); // the iterator is 'i'. ... }

#define FOR_ALL_SECOND ( SEQCLASS,
SEQ,
METHOD   ) 

Value:

FOR_ALL( SEQCLASS, SEQ )\
    { (*i).second-> METHOD (); }
For each 'second' member of element in a sequence, call a given method.

Note:
This will be deprecated. Use select2nd instead.
See also:
FOR_ALL


Function Documentation

template<class Sequence>
void libecs::checkSequenceSize ( const Sequence &  aSequence,
const typename Sequence::size_type  aMin 
)

Check if aSequence's size() is at least aMin.

If not, throw a RangeError exception.

template<class Sequence>
void libecs::checkSequenceSize ( const Sequence &  aSequence,
const typename Sequence::size_type  aMin,
const typename Sequence::size_type  aMax 
)

Check if aSequence's size() is within [ aMin, aMax ].

If not, throw a RangeError exception.

template<typename T>
Real libecs::real_not ( n  ) 

These functions are prepared for ExpressionFluxProcess and are used in it.

asinh, acosh and atanh are not available in MS Windows (MinGW).

template<typename NEW, typename GIVEN>
const String libecs::stringCast ( const GIVEN &  aValue  ) 

For internal use only.

Two usages:

This is a thin wrapper over boost::lexical_cast. This stringCast template function has some specializations for common numeric types such as Real and Integer are defined, and use of this instead of boost::lexical_cast for those types can reduce resulting binary size.


Generated on Mon Dec 18 07:24:45 2006 for E-CELL C++ libraries (libecs and libemc) 3.1.105 by  doxygen 1.5.1