C3D Kernel  104598
Classes | Modules | Defines | Typedefs | Enumerations | Functions | Variables
Templates and Serializations Library
The Geometric Modelling Module
Collaboration diagram for Templates and Serializations Library:

Classes

class  StrHash
 Hash with a string type. More...
class  MbAccurateTimer
class  MbAverageTimer
class  BalanceTreeNode< Type >
 Node of balanced tree. More...
class  BalanceTree< Type >
 Balanced tree. More...
class  BalanceTreeIterator< Type >
 Iterator of balanced tree. More...
class  PriorityQueue< Index, Weight >
 Priority queue using a heap. More...
class  KdTree< Scalar >
 K-d tree. More...
class  Visitor
 Abstract base class of the visitor. More...
class  VisitorImpl< T >
 A generallized declaration of support of the object visit by a concrete visitor. More...
class  AuxiliaryData
 Parent class of data for manager of parallel processing. More...
class  CacheCleaner
 Base class for objects which require resetting caches. More...
class  MbGarbageCollection
 Garbage collector for objects which use caches. More...
class  CommonMutex
 Wrapper for Linux mutex API. More...
class  ParallelRegionGuard
 Scoped guard of parallel region. More...
class  ScopedLock
 Scoped lock. Can accept a null pointer to a mutex. Locking occurs if the pointer to the mutex is nonzero and the code runs in parallel. More...
class  ScopedRecursiveLock
 Recursive scoped lock. Can accept a null pointer to a mutex. Locking occurs if the pointer to the mutex is nonzero and the code runs in parallel. More...
class  MbSyncItem
 Base synchronization object with lazy initialization. More...
class  MbNestSyncItem
 Base synchronization object with lazy initialization which supports nested locks. More...
class  MbPersistentSyncItem
 Base object providing means of synchronization. More...
class  MbPersistentNestSyncItem
 Base synchronization object with support of nested locks. More...
struct  IfProgressIndicator
 A run progress indicator. More...

Modules

 Containers
 Smart Pointers
 Work with Strings
 Work with Streams

Defines

#define GOLDENRATIO   0x9e3779b9
 Golden section - an arbitrary number for hash-function.
#define NullStrHash   StrHash( 0, StrHash::htp_undef )
 Hash of the empty string.
#define UndefStrHash   StrHash( -1, StrHash::htp_undef )
 Hash for the string absence.
#define PRECONDITION(expr)   ((void)0)
 The PRECONDITION definition.
#define CALL_DECLARATION
 The CALL_DECLARATION definition.
#define EXPORT_DECLARATION
 The EXPORT_DECLARATION definition.
#define OBVIOUS_PRIVATE_COPY(ClassName)
 The declaration of assignment operator and copy constructor.
#define COUNTOF(array)   (sizeof(array)/sizeof(array[0]))
 Get the number of array elements.
#define MATH_CLASS
 The declaration of export or import classes.
#define MATH_5_11_R03_VERSION   0x0590005CL
 The file version - 5.11.
#define MATH_5_BC_VERSION   0x0590005FL
 The file version - 5.0.
#define MATH_6_0_VERSION   0x06000009L
 The file version - 6.0.
#define MATH_6_PLUS_VERSION   0x06000032L
 The file version - 6.1.
#define MATH_7_0_VERSION   0x07000005L
 The file version - 7.0.
#define MATH_7_PLUS_VERSION   0x0701012CL
 The file version - 7.1.
#define MATH_8_0_VERSION   0x0800001AL
 The file version - 8.0.
#define MATH_8_PLUS_VERSION   0x08000133L
 The file version - 8.1.
#define MATH_9_0_VERSION   0x09000005L
 The file version - 9.0.
#define MATH_9_SP1_VERSION   0x09000008L
 The file version - 9.1.
#define LAST_NOUNICODE_VERSION   0x0A000018L
 The file version - 10.0 NoUnicode.
#define UNICODE_VERSION   0x0A001000L
 The file version - 10.0 Unicode.
#define MATH_10_VERSION   0x0A001021L
 The file version - 10.0.
#define MATH_10_SP1_VERSION   0x0A001023L
 The file version - 10.1.
#define MATH_11_VERSION   0x0B000031L
 The file version - 11.0.
#define MATH_11_SP1_VERSION   0x0B000032L
 The file version - 11.1.
#define MATH_12_VERSION   0x0C00004DL
 The file version - 12.0.
#define MATH_12_SP1_VERSION   0x0C00004EL
 The file version - 12.1.
#define MATH_13_START_VERSION   0x0D000000L
 The file version - 13.0 (start of version).
#define MATH_13_VERSION   0x0D000060L
 The file version - 13.0.
#define MATH_13_SP1_VERSION   0x0D001016L
 The file version - 13.1.
#define MATH_13_SP2_VERSION   0x0D002004L
 The file version - 13.2.
#define MATH_13_SP3_START_VERSION   0x0D003000L
 The file version - 13.3 (start of version).
#define MATH_13_SP3_VERSION   0x0D003001L
 The file version - 13.3.
#define MATH_14_START_VERSION   0x0E000000L
 The file version - 14.0 (start of version).
#define MATH_14_VERSION   0x0E000021L
 The file version - 14.0.
#define MATH_14_SP1_START_VERSION   0x0E001000L
 The file version - 14.1 (start of version).
#define MATH_14_SP1_VERSION   0x0E001011L
 The file version - 14.1.
#define MATH_14_SP2_START_VERSION   0x0E002000L
 The file version - 14.2 (start of version).
#define MATH_14_SP2_VERSION   0x0E002001L
 The file version - 14.2.
#define MATH_15_START_VERSION   0x0F000000L
 The file version - 15.0 (start of version).
#define MATH_15_VERSION   0x0F000014L
 The file version - 15.0.
#define MATH_15_SP1_START_VERSION   0x0F001000L
 The file version - 15.1 (start of version).
#define MATH_15_SP1_VERSION   0x0F001010L
 The file version - 15.1.
#define MATH_15_SP2_START_VERSION   0x0F002000L
 The file version - 15.2 (start of version).
#define MATH_15_SP2_VERSION   0x0F002010L
 The file version - 15.2.
#define MATH_16_START_VERSION   0x10000000L
 The file version - 16.0 (start of version).
#define C3D_16_VERSION   0x10000008L
 The file version - C3D 16.0.
#define MATH_16_VERSION   0x1000000DL
 The file version - 16.0.
#define MATH_16_SP1_START_VERSION   0x10001000L
 The file version - 16.1 (start of version).
#define MATH_16_SP1_VERSION   0x10001002L
 The file version - 16.1.
#define MATH_17_START_VERSION   0x11000000L
 The file version - 17.0 (start of version).
#define C3D_2016_VERSION   0x1100000FL
 The file version - C3D 2016.
#define MATH_17_VERSION   0x1100001FL
 The file version - 17.0.
#define C3D_2017_VERSION   MATH_17_VERSION
 The file version - C3D 2017.
#define MATH_17_SP1_VERSION   0x11001001L
 The file version - 17.1.
#define MATH_18_START_VERSION   0x12000000L
 The file version - 18.0 (start of version).
#define C3D_2018_VERSION   0x1200000DL
 The file version - C3D 2018.
#define MATH_18_VERSION   0x12000010L
 The file version - 18.0.
#define MATH_19_START_VERSION   0x13000000L
 The file version - 19.0 (start of version).
#define C3D_DEBUG
#define VISITING_CLASS(Class)
 Implementation of a function initializing a visit of an object.
#define DECLARE_RESET_FUNCS(Class)
 Declaration of a cleaning function.
#define IMPL_RESET_FUNCS(Class)
 Implementation of a function for resetting caches.
#define CommonRecursiveMutex   CommonMutex
 Same implementation of CommonMutex and CommonRecursiveMutex.

Typedefs

typedef uint32 SimpleName
 Definition of simple name.
typedef int8_t int8
typedef uint8_t uint8
typedef int16_t int16
typedef uint16_t uint16
typedef int32_t int32
typedef uint32_t uint32
typedef int64_t int64
typedef uint64_t uint64
typedef unsigned int uint
typedef uint32 VERSION
 Version.

Enumerations

enum  DelType { defDelete, noDelete, Delete }
 Types of elemets deletion. More...
enum  ThreeStates { ts_negative = -1, ts_neutral = 0, ts_positive = 1 }
 Tree-position flag. More...

Functions

int SimpleNameCompare (const SimpleName &h1, const SimpleName &h2)
 Compare simple names.
bool IsGoodSimpleName (const SimpleName &s)
 Check the simple name correctness.
SimpleName Hash32 (uint8 *k, size_t length, SimpleName _c=INIT_HASH32_VAL)
 Hash-function.
template<typename T >
SimpleName Hash32Ptr (T *k)
 Hash of the pointer.
SimpleName HashStr (const c3d::string_t &str)
 Hash of the string.
SimpleName HashStr (const char *c_str)
 Hash of the string.
SimpleName HashStr (const wchar_t *w_str)
 Hash of the string.
SimpleName Hash32SN (SimpleName k1, SimpleName k2)
 Hash of two simple names.
bool IsVersion16bit (VERSION version)
 Whether there is a 16-bit file version.
bool IsVersion32bit (VERSION version)
 Whether there is a 32-bit file version.
bool IsVersion64bit (VERSION version)
 Whether there is a 64-bit file version.
VERSION GetCurrentMathFileVersion ()
 The current version.
uint16 MkUint16 (uint8 lo, uint8 hi)
 Create uint16 by two uint8.
uint32 MkUint32 (uint16 lo, uint16 hi)
 Create uint32 by two uint16.
uint64 MkUint64 (uint32 lo, uint32 hi)
 Create uint64 by two uint32.
uint32 LoUint32 (uint64 u64)
 Get lower uint32 word from uint64.
int32 LoInt32 (uint64 u64)
 Get lower int32 word from int64.
uint32 HiUint32 (uint64 u64)
 Get upper uint32 word from uint64.
int32 HiInt32 (uint64 u64)
 Get upper int32 word from int64.
uint16 LoUint16 (uint32 u32)
 Get lower int16 word from int32.
int16 LoInt16 (uint32 u32)
 Get lower int16 word from uint32.
uint16 HiUint16 (uint32 u32)
 Get upper uint16 word from uint32.
int16 HiInt16 (uint32 u32)
 Get upper int16 word from uint32.
uint8 LoUint8 (uint16 u16)
 Get lower uint8 word from uint16.
int8 LoInt8 (uint16 u16)
 Get lower int8 word from uint16.
uint8 HiUint8 (uint16 u16)
 Get upper uint8 word from uint16.
int8 HiInt8 (uint16 u16)
 Get upper int8 word from uint16.
template<class SignedType >
SignedType abs_t (const SignedType x)
 Absolute value.
void EnableMathModules (const char *name, int nameLength, const char *key, int keyLength)
 Enable kernel modules.
bool VerifyLicenseKey (const char *name, const char *key, const char *pub_key)
bool IsMathModelerEnable ()
bool IsMathConverterEnable ()
bool IsMathSolverEnable ()
bool IsMathVisionEnable ()
void FreeMathModulesChecker ()
void c3d::EnableMemoryLeakDump ()

Variables

const SimpleName SIMPLENAME_MAX = SYS_MAX_UINT32
 Maximum allowable simple name.
const SimpleName UNDEFINED_SNAME = SYS_MAX_UINT32
 A value is used as "undefined", not yet assigned name.
const SimpleName INIT_HASH32_VAL = 31415926
 The initial value for the hash-function.
const uint SYS_MAX_UINT = 0xffffffff
 Maximum value of uint.
const size_t SYS_MAX_T = 0xffffffff
 Maximum value of size_t.
const ptrdiff_t SYS_MAX_ST = 0x7fffffff
 Maximum value of ptrdiff_t.
const ptrdiff_t SYS_MIN_ST = 0x80000000
 Minimum value of ptrdiff_t.
const uint8 SYS_MAX_UINT8 = 0xFF
 Maximum value of uint8.
const uint16 SYS_MAX_UINT16 = 0xFFFF
 Maximum value of uint16.
const uint32 SYS_MAX_UINT32 = 0xFFFFFFFF
 Maximum value of uint32.
const uint64 SYS_MAX_UINT64 = 0xFFFFFFFFFFFFFFFF
 Maximum value of uint64.
const int16 SYS_MAX_INT16 = 0x7FFF
 Maximum value of int16.
const int32 SYS_MAX_INT32 = 0x7FFFFFFF
 Maximum value of int32.
const int64 SYS_MAX_INT64 = 0x7FFFFFFFFFFFFFFF
 Maximum value of int64.
const int16 SYS_MIN_INT16 = (int16)(uint16)0x8000
 Minimum value of int16.
const int32 SYS_MIN_INT32 = (int32)(uint32)0x80000000
 Minimum value of int32.
const int64 SYS_MIN_INT64 = (int64)(uint64)0x8000000000000000
 Minimum value of int64.
const size_t NSIZE = SYS_MAX_T
 Undefined size.
const uint NPOS32 = (uint)SYS_MAX_UINT32
 Undefined position (for 32-bit data).
const size_t SIZE_OF_POINTER = sizeof(char *)
 Size of pointer in bytes.

Define Documentation

#define NullStrHash   StrHash( 0, StrHash::htp_undef )

Hash of the empty string.

#define UndefStrHash   StrHash( -1, StrHash::htp_undef )

Hash for the string absence.

#define CALL_DECLARATION

The CALL_DECLARATION definition.

#define EXPORT_DECLARATION

The EXPORT_DECLARATION definition.

#define OBVIOUS_PRIVATE_COPY (   ClassName)
Value:
private:                                        \
  ClassName & operator = ( const ClassName & ); \
  ClassName( const ClassName & );

The declaration of private assignment operator and copy constructor. This is used to prohibit an implicit implementation of this functionality because if there is no an explicit copy constructor or an assignment operator implicit copy constructor and assigment operator are generated automatically mostly by copying of memory, that can lead to incorrect behaviour of the system.

#define MATH_CLASS

The declaration of export in this module or import in other plugged modules.

#define VISITING_CLASS (   Class)
Value:
public:                                                                             \
    virtual void Accept( Visitor & visitor )                                          \
    {                                                                                 \
      VisitorImpl<Class> * impl = dynamic_cast<VisitorImpl<Class> *>(&visitor);       \
      if( impl )                                                                      \
        impl->Visit( *this );                                                         \
    }

Implementation of a function initializing a visit of an object.
It is made by the dynamic cast in order to implement an asymmetric visitor (see Alexandrescu "Modern C++ Design"). There is necessary to declare this in every class which supports a visitor.

#define DECLARE_RESET_FUNCS (   Class)
Value:
public:                                \
    virtual void ResetCacheData();

Declaration of a cleaning function.

#define IMPL_RESET_FUNCS (   Class)
Value:
void Class::ResetCacheData ()        \
{                                        \
  cache.Reset();                         \
}

Implementation of a cleaning function for an object which uses caches.


Typedef Documentation

typedef uint32 SimpleName

Definition of simple name.


Enumeration Type Documentation

enum DelType

Types of elements deletion while the deletion from an array.

Enumerator:
defDelete 

Delete an object by default.

noDelete 

Do not delete an object.

Delete 

Delete an object.

A flag of three states.

Enumerator:
ts_negative 

The state NO.

ts_neutral 

The state UNKNOWN.

ts_positive 

The state YES.


Function Documentation

SimpleName Hash32 ( uint8 *  k,
size_t  length,
SimpleName  _c = INIT_HASH32_VAL 
) [inline]

Hash by sequence of bytes and the previous hash.
Each byte k influences on the return value.
The function is bad for use in the cryptography.
k - A pointer to the beginning of the bytes sequence.
length - Number of bytes in the sequence.
_c - The previous hash or an arbitrary value.

Returns:
Returns 32-bit number.
template<typename T >
SimpleName Hash32Ptr ( T *  k)

Hash of the pointer.

SimpleName HashStr ( const c3d::string_t str) [inline]

Hash of the string.

SimpleName HashStr ( const char *  c_str) [inline]

Hash of the string.

SimpleName HashStr ( const wchar_t *  w_str) [inline]

Hash of the string.

SimpleName Hash32SN ( SimpleName  k1,
SimpleName  k2 
) [inline]

Hash of two simple names.
Frequently occurring combination - hash of two SimpleName (uint32).

template<class SignedType >
SignedType abs_t ( const SignedType  x)

Absolute value.

void EnableMathModules ( const char *  name,
int  nameLength,
const char *  key,
int  keyLength 
)

Enable the corresponding kernel modules.

bool VerifyLicenseKey ( const char *  name,
const char *  key,
const char *  pub_key 
)

Verify key.

bool IsMathModelerEnable ( )

Check the controller of the Modeler.

bool IsMathConverterEnable ( )

Check the controller of the Converter.

bool IsMathSolverEnable ( )

Check the controller of the Solver.

bool IsMathVisionEnable ( )

Check the controller of the Vision.

void FreeMathModulesChecker ( )

Free the controller of the kernel modules work.

void c3d::EnableMemoryLeakDump ( )

Enable memory leakage control.


Variable Documentation

const size_t SIZE_OF_POINTER = sizeof(char *)

Size of pointer in bytes.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines