MOAB: Mesh Oriented datABase  (version 5.4.1)
Internals.hpp File Reference
#include "moab/Types.hpp"
#include <cassert>
+ Include dependency graph for Internals.hpp:

Go to the source code of this file.

Namespaces

namespace  moab
 

Class representing axis-aligned bounding box.


Defines

#define MB_TYPE_WIDTH   4
#define MB_ID_WIDTH   ( 8 * sizeof( EntityHandle ) - MB_TYPE_WIDTH )
#define MB_TYPE_MASK   ( (EntityHandle)0xF << MB_ID_WIDTH )
#define MB_START_ID   ( (EntityID)1 )
 All entity id's currently start at 1.
#define MB_END_ID   ( (EntityID)MB_ID_MASK )
 Last id is the complement of the MASK.
#define MB_ID_MASK   ( ~MB_TYPE_MASK )

Functions

EntityHandle moab::CREATE_HANDLE (const unsigned type, const EntityID id, int &err)
 Given a type and an id create a handle.
EntityHandle moab::CREATE_HANDLE (const unsigned type, const EntityID id)
EntityHandle moab::FIRST_HANDLE (unsigned type)
EntityHandle moab::LAST_HANDLE (unsigned type)
EntityID moab::ID_FROM_HANDLE (EntityHandle handle)
 Get the entity id out of the handle.
EntityType moab::TYPE_FROM_HANDLE (EntityHandle handle)

Define Documentation

#define MB_ID_MASK   ( ~MB_TYPE_MASK )

Definition at line 52 of file Internals.hpp.

Referenced by moab::FID_FROM_HALFFACET(), and moab::ID_FROM_HANDLE().

#define MB_TYPE_MASK   ( (EntityHandle)0xF << MB_ID_WIDTH )

Definition at line 47 of file Internals.hpp.

#define MB_TYPE_WIDTH   4

Define EntityHandle for both 32 bit and 64 bit systems. The decision to use 64 bit handles must be made at compile time.

EntityHandle format: 0xXYYYYYYY (assuming a 32-bit handle. Top 4 bits reserved on a 64 bit system) X - reserved for entity type. This system can only handle 15 different types Y - Entity id space. Max id is over 200M

Note that for specialized databases (such as all hex) 16 bits are not required for the entity type and the id space can be increased to over 2B.

Definition at line 45 of file Internals.hpp.

Referenced by main().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines