Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
geomtools::geom_id Class Reference

#include <bayeux/geomtools/geom_id.h>

Inheritance diagram for geomtools::geom_id:
datatools::i_serializable

Public Member Functions

bool is_type (uint32_t) const
 Check if the type match a given value. More...
 
uint32_t get_type () const
 Return the type. More...
 
void set_type (uint32_t)
 Set the type. More...
 
void set_depth (uint32_t depth_)
 Set the depth. More...
 
uint32_t get_depth () const
 Returns the address' depth. More...
 
uint32_t get (int) const
 Returns the subaddress value at given index. More...
 
void set (int, uint32_t val_)
 Set the subaddress at given index to a given value. More...
 
void set_any (int)
 Set the subaddress at given index to the any value. More...
 
void set_invalid (int)
 Invalidate the subaddress at given index to 'any'. More...
 
bool is_invalid (int) const
 Check if subaddress at given index is invalid. More...
 
bool is_any (int) const
 Check if subaddress at given index is 'any'. More...
 
void set_address (uint32_t si0_, uint32_t si1_=INVALID_ADDRESS, uint32_t si2_=INVALID_ADDRESS, uint32_t si3_=INVALID_ADDRESS, uint32_t si4_=INVALID_ADDRESS, uint32_t si5_=INVALID_ADDRESS, uint32_t si6_=INVALID_ADDRESS, uint32_t si7_=INVALID_ADDRESS, uint32_t si8_=INVALID_ADDRESS, uint32_t si9_=INVALID_ADDRESS)
 Set the addresses (up to depth = 10) More...
 
void reset_address ()
 Reset the address. More...
 
 geom_id ()
 Default constructor. More...
 
 geom_id (uint32_t type_, uint32_t si0_)
 Constructor (depth=1) More...
 
 geom_id (uint32_t type_, uint32_t si0_, uint32_t si1_)
 Constructor (depth=2) More...
 
 geom_id (uint32_t type_, uint32_t si0_, uint32_t si1_, uint32_t si2_)
 Constructor (depth=3) More...
 
 geom_id (uint32_t type_, uint32_t si0_, uint32_t si1_, uint32_t si2_, uint32_t si3_)
 Constructor (depth=4) More...
 
 geom_id (uint32_t type_, uint32_t si0_, uint32_t si1_, uint32_t si2_, uint32_t si3_, uint32_t si4_, uint32_t si5_=INVALID_ADDRESS, uint32_t si6_=INVALID_ADDRESS, uint32_t si7_=INVALID_ADDRESS, uint32_t si8_=INVALID_ADDRESS, uint32_t si9_=INVALID_ADDRESS)
 Constructor (up to depth = 10) More...
 
virtual ~geom_id ()
 Destructor. More...
 
void reset ()
 Reset/invalidate the GID. More...
 
void invalidate ()
 Reset/invalidate the GID. More...
 
bool is_valid () const
 Check if the GID is valid. More...
 
bool is_complete () const
 Check if the GID is complete. More...
 
void extract_to (geom_id &target_) const
 Fill the target GID's addresses with current GID's addresses up to the target GID's depth. More...
 
void extract_from (const geom_id &source_)
 
void inherits_from (const geom_id &source_)
 
bool match_impl (const geom_id &id_, bool exact_) const
 Non-overloaded version for CAMP reflection tools: More...
 
bool match (const geom_id &id_, bool exact_=false) const
 
bool operator== (const geom_id &id_) const
 
bool operator!= (const geom_id &id_) const
 
bool operator< (const geom_id &id_) const
 
bool operator<= (const geom_id &id_) const
 
bool operator>= (const geom_id &id_) const
 
bool operator> (const geom_id &id_) const
 
void make (int type_, int depth_)
 Initialize the GID with a given type and address' depth. More...
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 Default constructor. More...
 
virtual ~i_serializable ()
 Destructor. More...
 
virtual const std::string & get_serial_tag () const =0
 Return the serialization string identifier of the class. More...
 

Static Public Member Functions

static bool match (const geom_id &id1_, const geom_id &id2_, bool exact_=false)
 
static int compare (const geom_id &id1_, const geom_id &id2_)
 
static void make (geom_id &id_, int type_, int depth_)
 
static bool sub_id_comp (uint32_t si1_, uint32_t si2_)
 

Static Public Attributes

static const uint32_t INVALID_TYPE = 0xFFFFFFFF
 
static const uint32_t INVALID_ADDRESS = 0xFFFFFFFF
 
static const uint32_t ANY_ADDRESS = 0xFFFFFFFE
 
static const uint32_t DEFAULT_ADDRESS_DEPTH = 10
 
static const uint32_t UNIVERSE_TYPE = 0
 
static const uint32_t WORLD_TYPE = geom_id::UNIVERSE_TYPE
 
static const char IO_ID_OPEN
 
static const char IO_ID_SEPARATOR
 
static const char IO_ADDRESS_SEPARATOR
 
static const char IO_TYPE_INVALID
 
static const char IO_ADDRESS_INVALID
 
static const char IO_ID_CLOSE
 
static const char IO_ADDRESS_ANY
 

Friends

std::ostream & operator<< (std::ostream &out_, const geom_id &id_)
 
std::istream & operator>> (std::istream &in_, geom_id &id_)
 

Constructor & Destructor Documentation

◆ geom_id() [1/6]

geomtools::geom_id::geom_id ( )

Default constructor.

◆ geom_id() [2/6]

geomtools::geom_id::geom_id ( uint32_t  type_,
uint32_t  si0_ 
)

Constructor (depth=1)

◆ geom_id() [3/6]

geomtools::geom_id::geom_id ( uint32_t  type_,
uint32_t  si0_,
uint32_t  si1_ 
)

Constructor (depth=2)

◆ geom_id() [4/6]

geomtools::geom_id::geom_id ( uint32_t  type_,
uint32_t  si0_,
uint32_t  si1_,
uint32_t  si2_ 
)

Constructor (depth=3)

◆ geom_id() [5/6]

geomtools::geom_id::geom_id ( uint32_t  type_,
uint32_t  si0_,
uint32_t  si1_,
uint32_t  si2_,
uint32_t  si3_ 
)

Constructor (depth=4)

◆ geom_id() [6/6]

geomtools::geom_id::geom_id ( uint32_t  type_,
uint32_t  si0_,
uint32_t  si1_,
uint32_t  si2_,
uint32_t  si3_,
uint32_t  si4_,
uint32_t  si5_ = INVALID_ADDRESS,
uint32_t  si6_ = INVALID_ADDRESS,
uint32_t  si7_ = INVALID_ADDRESS,
uint32_t  si8_ = INVALID_ADDRESS,
uint32_t  si9_ = INVALID_ADDRESS 
)

Constructor (up to depth = 10)

◆ ~geom_id()

virtual geomtools::geom_id::~geom_id ( )
virtual

Destructor.

Member Function Documentation

◆ compare()

static int geomtools::geom_id::compare ( const geom_id id1_,
const geom_id id2_ 
)
static

◆ extract_from()

void geomtools::geom_id::extract_from ( const geom_id source_)

◆ extract_to()

void geomtools::geom_id::extract_to ( geom_id target_) const

Fill the target GID's addresses with current GID's addresses up to the target GID's depth.

◆ get()

uint32_t geomtools::geom_id::get ( int  ) const

Returns the subaddress value at given index.

◆ get_depth()

uint32_t geomtools::geom_id::get_depth ( ) const

Returns the address' depth.

◆ get_type()

uint32_t geomtools::geom_id::get_type ( ) const

Return the type.

◆ inherits_from()

void geomtools::geom_id::inherits_from ( const geom_id source_)

◆ invalidate()

void geomtools::geom_id::invalidate ( )

Reset/invalidate the GID.

◆ is_any()

bool geomtools::geom_id::is_any ( int  ) const

Check if subaddress at given index is 'any'.

◆ is_complete()

bool geomtools::geom_id::is_complete ( ) const

Check if the GID is complete.

◆ is_invalid()

bool geomtools::geom_id::is_invalid ( int  ) const

Check if subaddress at given index is invalid.

◆ is_type()

bool geomtools::geom_id::is_type ( uint32_t  ) const

Check if the type match a given value.

◆ is_valid()

bool geomtools::geom_id::is_valid ( ) const

Check if the GID is valid.

◆ make() [1/2]

void geomtools::geom_id::make ( int  type_,
int  depth_ 
)

Initialize the GID with a given type and address' depth.

◆ make() [2/2]

static void geomtools::geom_id::make ( geom_id id_,
int  type_,
int  depth_ 
)
static

◆ match() [1/2]

bool geomtools::geom_id::match ( const geom_id id_,
bool  exact_ = false 
) const

◆ match() [2/2]

static bool geomtools::geom_id::match ( const geom_id id1_,
const geom_id id2_,
bool  exact_ = false 
)
static

◆ match_impl()

bool geomtools::geom_id::match_impl ( const geom_id id_,
bool  exact_ 
) const

Non-overloaded version for CAMP reflection tools:

◆ operator!=()

bool geomtools::geom_id::operator!= ( const geom_id id_) const

◆ operator<()

bool geomtools::geom_id::operator< ( const geom_id id_) const

◆ operator<=()

bool geomtools::geom_id::operator<= ( const geom_id id_) const

◆ operator==()

bool geomtools::geom_id::operator== ( const geom_id id_) const

◆ operator>()

bool geomtools::geom_id::operator> ( const geom_id id_) const

◆ operator>=()

bool geomtools::geom_id::operator>= ( const geom_id id_) const

◆ reset()

void geomtools::geom_id::reset ( )

Reset/invalidate the GID.

◆ reset_address()

void geomtools::geom_id::reset_address ( )

Reset the address.

◆ set()

void geomtools::geom_id::set ( int  ,
uint32_t  val_ 
)

Set the subaddress at given index to a given value.

◆ set_address()

void geomtools::geom_id::set_address ( uint32_t  si0_,
uint32_t  si1_ = INVALID_ADDRESS,
uint32_t  si2_ = INVALID_ADDRESS,
uint32_t  si3_ = INVALID_ADDRESS,
uint32_t  si4_ = INVALID_ADDRESS,
uint32_t  si5_ = INVALID_ADDRESS,
uint32_t  si6_ = INVALID_ADDRESS,
uint32_t  si7_ = INVALID_ADDRESS,
uint32_t  si8_ = INVALID_ADDRESS,
uint32_t  si9_ = INVALID_ADDRESS 
)

Set the addresses (up to depth = 10)

◆ set_any()

void geomtools::geom_id::set_any ( int  )

Set the subaddress at given index to the any value.

◆ set_depth()

void geomtools::geom_id::set_depth ( uint32_t  depth_)

Set the depth.

◆ set_invalid()

void geomtools::geom_id::set_invalid ( int  )

Invalidate the subaddress at given index to 'any'.

◆ set_type()

void geomtools::geom_id::set_type ( uint32_t  )

Set the type.

◆ sub_id_comp()

static bool geomtools::geom_id::sub_id_comp ( uint32_t  si1_,
uint32_t  si2_ 
)
static

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out_,
const geom_id id_ 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  in_,
geom_id id_ 
)
friend

Member Data Documentation

◆ ANY_ADDRESS

const uint32_t geomtools::geom_id::ANY_ADDRESS = 0xFFFFFFFE
static

◆ DEFAULT_ADDRESS_DEPTH

const uint32_t geomtools::geom_id::DEFAULT_ADDRESS_DEPTH = 10
static

◆ INVALID_ADDRESS

const uint32_t geomtools::geom_id::INVALID_ADDRESS = 0xFFFFFFFF
static

◆ INVALID_TYPE

const uint32_t geomtools::geom_id::INVALID_TYPE = 0xFFFFFFFF
static

◆ IO_ADDRESS_ANY

const char geomtools::geom_id::IO_ADDRESS_ANY
static

◆ IO_ADDRESS_INVALID

const char geomtools::geom_id::IO_ADDRESS_INVALID
static

◆ IO_ADDRESS_SEPARATOR

const char geomtools::geom_id::IO_ADDRESS_SEPARATOR
static

◆ IO_ID_CLOSE

const char geomtools::geom_id::IO_ID_CLOSE
static

◆ IO_ID_OPEN

const char geomtools::geom_id::IO_ID_OPEN
static

◆ IO_ID_SEPARATOR

const char geomtools::geom_id::IO_ID_SEPARATOR
static

◆ IO_TYPE_INVALID

const char geomtools::geom_id::IO_TYPE_INVALID
static

◆ UNIVERSE_TYPE

const uint32_t geomtools::geom_id::UNIVERSE_TYPE = 0
static

◆ WORLD_TYPE

const uint32_t geomtools::geom_id::WORLD_TYPE = geom_id::UNIVERSE_TYPE
static

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