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

A set of indexes representing subaddresses in a geometry ID (see geomtools::geom_id) More...

#include <bayeux/geomtools/address_set.h>

Public Types

enum  mode_type {
  MODE_INVALID = -1, MODE_NONE = 0, MODE_ALL = 1, MODE_RANGE = 2,
  MODE_LIST = 3, MODE_DEFAULT = MODE_NONE
}
 Mode to test the belonging of an address to the set. More...
 

Public Member Functions

bool is_valid () const
 Check the validity of the set. More...
 
void invalidate ()
 Invalidate the set. More...
 
bool is_reverse () const
 Check the reverse flag. More...
 
void set_reverse (bool=true)
 Set the reverse flag. More...
 
bool is_mode_none () const
 Check if the mode is defined. More...
 
bool is_mode_all () const
 Check if the mode 'all' is activated. More...
 
bool is_mode_range () const
 Check if mode 'range' is used. More...
 
bool is_mode_list () const
 Check if mode 'list' is used. More...
 
void set_mode_none ()
 Set the mode 'mode'. More...
 
void set_mode_all ()
 Set the mode 'all'. More...
 
void set_mode_range ()
 Set the mode 'range'. More...
 
void set_range (uint32_t a_min, uint32_t a_max)
 Set the range ('range' mode only) More...
 
void set_mode_range (uint32_t a_min, uint32_t a_max)
 Set the mode 'range' and associated range. More...
 
void set_mode_list ()
 Set the mode 'list'. More...
 
void add_to_list (uint32_t a_value)
 Add an address to the list ('list' mode only) More...
 
bool match (uint32_t a_value) const
 Check if a value matches the collection of addresses. More...
 
void reset ()
 Terminate. More...
 
 address_set ()
 Constructor. More...
 

Friends

std::ostream & operator<< (std::ostream &a_out, const address_set &a_addset)
 Print operator. More...
 
std::istream & operator>> (std::istream &a_in, address_set &a_addset)
 Reader operator. More...
 

Detailed Description

A set of indexes representing subaddresses in a geometry ID (see geomtools::geom_id)

Supported syntax:

Member Enumeration Documentation

◆ mode_type

Mode to test the belonging of an address to the set.

Enumerator
MODE_INVALID 
MODE_NONE 

Invalid mode.

No candidate value is valid

MODE_ALL 

All candidate values are valid.

MODE_RANGE 

A candidate value is valid only if it lies in some specific range of values.

MODE_LIST 

A candidate value is valid only if it belongs to a specific list of values.

MODE_DEFAULT 

Constructor & Destructor Documentation

◆ address_set()

geomtools::address_set::address_set ( )

Constructor.

Member Function Documentation

◆ add_to_list()

void geomtools::address_set::add_to_list ( uint32_t  a_value)

Add an address to the list ('list' mode only)

◆ invalidate()

void geomtools::address_set::invalidate ( )

Invalidate the set.

◆ is_mode_all()

bool geomtools::address_set::is_mode_all ( ) const

Check if the mode 'all' is activated.

◆ is_mode_list()

bool geomtools::address_set::is_mode_list ( ) const

Check if mode 'list' is used.

◆ is_mode_none()

bool geomtools::address_set::is_mode_none ( ) const

Check if the mode is defined.

◆ is_mode_range()

bool geomtools::address_set::is_mode_range ( ) const

Check if mode 'range' is used.

◆ is_reverse()

bool geomtools::address_set::is_reverse ( ) const

Check the reverse flag.

◆ is_valid()

bool geomtools::address_set::is_valid ( ) const

Check the validity of the set.

◆ match()

bool geomtools::address_set::match ( uint32_t  a_value) const

Check if a value matches the collection of addresses.

◆ reset()

void geomtools::address_set::reset ( )

Terminate.

◆ set_mode_all()

void geomtools::address_set::set_mode_all ( )

Set the mode 'all'.

◆ set_mode_list()

void geomtools::address_set::set_mode_list ( )

Set the mode 'list'.

◆ set_mode_none()

void geomtools::address_set::set_mode_none ( )

Set the mode 'mode'.

◆ set_mode_range() [1/2]

void geomtools::address_set::set_mode_range ( )

Set the mode 'range'.

◆ set_mode_range() [2/2]

void geomtools::address_set::set_mode_range ( uint32_t  a_min,
uint32_t  a_max 
)

Set the mode 'range' and associated range.

◆ set_range()

void geomtools::address_set::set_range ( uint32_t  a_min,
uint32_t  a_max 
)

Set the range ('range' mode only)

◆ set_reverse()

void geomtools::address_set::set_reverse ( bool  = true)

Set the reverse flag.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  a_out,
const address_set a_addset 
)
friend

Print operator.

◆ operator>>

std::istream& operator>> ( std::istream &  a_in,
address_set a_addset 
)
friend

Reader operator.


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