Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
geomtools::placement::builder Class Reference

Construct a placement. More...

#include <bayeux/geomtools/placement.h>

Public Types

enum  init_flags { no_child_to_mother_gap = datatools::bit_mask::bit00, no_rotation = datatools::bit_mask::bit01 }
 
enum  child_to_mother_gap_mode {
  gap_undefined = 0, gap_center_to_min = 1, gap_center_to_max = 2, gap_min_to_min = 3,
  gap_min_to_max = 4, gap_max_to_min = 5, gap_max_to_max = 6
}
 Child to mother gap mode: More...
 

Public Member Functions

 builder (uint32_t flags_=0)
 Constructor from initialization flags. More...
 
bool has_mother_stackable () const
 
void set_mother_stackable (const stackable_data &)
 
bool has_child_stackable () const
 
void set_child_stackable (const stackable_data &)
 
bool use_child_to_mother_gap () const
 
bool allowed_rotation () const
 
void configure (uint32_t flags_=0)
 Configure from flags. More...
 
void reset ()
 Reset the builder. More...
 
void build (const datatools::properties &config_, placement &p_) const
 Build a placement object from a set of parameters. More...
 

Static Public Member Functions

static child_to_mother_gap_mode get_gap_mode (const std::string &label_)
 Return child/mother gap mode from a label. More...
 
static std::string get_gap_mode_label (child_to_mother_gap_mode)
 Return the label associated ti a given child/mother gap mode. More...
 
static bool needs_stackable_child (child_to_mother_gap_mode)
 Check if a given child/mother gap mode needs child stackable informations. More...
 

Protected Member Functions

void _build (const datatools::properties &config_, placement &p_) const
 

Detailed Description

Construct a placement.

Example of properties:

x : real as length = 2.0 mm
y : real as length = 0.0 mm
z : real as length = 0.0 mm
rotation_axis : string = "z"
angle : real as angle = 45.0 degree

Example of properties:

x : real as length = 2.0 mm
y : real as length = 0.0 mm
z : real as length = 0.0 mm
phi : real as angle = 45.0 degree
theta : real as angle = 25.0 degree
delta : real as angle = 10.0 degree

Example of properties:

x.gap_mode : string = "min_to_min"
x.gap_distance : real as length = 2.0 mm
y : real as length = 10.0 mm
z : real as length = 10.0 mm
rotation_axis : string = "z"
angle : real as angle = 45.0 degree
geommtools::placement::builder b;
b.set_mother_stackable(mother_stacking_info);
b.set_child_stackable(child_stacking_info);
b.build(config, p);

Member Enumeration Documentation

◆ child_to_mother_gap_mode

Child to mother gap mode:

Enumerator
gap_undefined 

Undefined gap mode.

gap_center_to_min 

Gap between the child origin to mother minimum border.

gap_center_to_max 

Gap between the child origin to mother maximum border.

gap_min_to_min 

Gap between the child minimum border to mother minimum border.

gap_min_to_max 

Gap between the child minimum border to mother maximum border.

gap_max_to_min 

Gap between the child maximum border to mother minimum border.

gap_max_to_max 

Gap between the child maximum border to mother maximum border.

◆ init_flags

Enumerator
no_child_to_mother_gap 

Inhibit the child/mother gap build modes.

no_rotation 

Inhibit rotation.

Constructor & Destructor Documentation

◆ builder()

geomtools::placement::builder::builder ( uint32_t  flags_ = 0)

Constructor from initialization flags.

Member Function Documentation

◆ _build()

void geomtools::placement::builder::_build ( const datatools::properties config_,
placement p_ 
) const
protected

◆ allowed_rotation()

bool geomtools::placement::builder::allowed_rotation ( ) const

◆ build()

void geomtools::placement::builder::build ( const datatools::properties config_,
placement p_ 
) const

Build a placement object from a set of parameters.

◆ configure()

void geomtools::placement::builder::configure ( uint32_t  flags_ = 0)

Configure from flags.

◆ get_gap_mode()

static child_to_mother_gap_mode geomtools::placement::builder::get_gap_mode ( const std::string &  label_)
static

Return child/mother gap mode from a label.

◆ get_gap_mode_label()

static std::string geomtools::placement::builder::get_gap_mode_label ( child_to_mother_gap_mode  )
static

Return the label associated ti a given child/mother gap mode.

◆ has_child_stackable()

bool geomtools::placement::builder::has_child_stackable ( ) const

◆ has_mother_stackable()

bool geomtools::placement::builder::has_mother_stackable ( ) const

◆ needs_stackable_child()

static bool geomtools::placement::builder::needs_stackable_child ( child_to_mother_gap_mode  )
static

Check if a given child/mother gap mode needs child stackable informations.

◆ reset()

void geomtools::placement::builder::reset ( )

Reset the builder.

◆ set_child_stackable()

void geomtools::placement::builder::set_child_stackable ( const stackable_data )

◆ set_mother_stackable()

void geomtools::placement::builder::set_mother_stackable ( const stackable_data )

◆ use_child_to_mother_gap()

bool geomtools::placement::builder::use_child_to_mother_gap ( ) const

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