Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | List of all members
materials::isotope::id Class Reference

The identifier for an isotope based on its Z and A>=Z numbers. More...

#include <bayeux/materials/isotope.h>

Inheritance diagram for materials::isotope::id:
datatools::i_tree_dumpable

Public Member Functions

 id ()
 Default constructor. More...
 
 id (int z_, int a_)
 Constructor. More...
 
void reset ()
 Reset. More...
 
void set_z (int z_)
 Set the number of protons. More...
 
int get_z () const
 Return the number of protons. More...
 
void set_a (int z_)
 Set the number of nucleons. More...
 
int get_a () const
 Return the number of nucleons. More...
 
void set (int z_, int a_)
 Set the numbers of protons and nucleons. More...
 
std::string get_name () const
 Return the name associated to the isotope Id. More...
 
void to_string (std::string &) const
 Export to a string identifier. More...
 
std::string to_string () const
 Return a string identifier. More...
 
bool from_string (const std::string &)
 Import from a string identifier. More...
 
bool is_valid () const
 Check the validity of the isotope id. More...
 
bool operator< (const id &) const
 Comparison operator. More...
 
bool operator== (const id &) const
 Comparison operator. More...
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 Constructor. More...
 
virtual ~i_tree_dumpable ()
 Destructor. More...
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 Main new interface method for printing. More...
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 Printing with jsonized options. More...
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 Printing with jsonized options. More...
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 

Additional Inherited Members

- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type { OSTREAM_COUT = 1, OSTREAM_CERR = 2, OSTREAM_CLOG = 3 }
 Enumeration for standard output streams. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Detailed Description

The identifier for an isotope based on its Z and A>=Z numbers.

Constructor & Destructor Documentation

◆ id() [1/2]

materials::isotope::id::id ( )

Default constructor.

◆ id() [2/2]

materials::isotope::id::id ( int  z_,
int  a_ 
)

Constructor.

Member Function Documentation

◆ from_string()

bool materials::isotope::id::from_string ( const std::string &  )

Import from a string identifier.

◆ get_a()

int materials::isotope::id::get_a ( ) const

Return the number of nucleons.

◆ get_name()

std::string materials::isotope::id::get_name ( ) const

Return the name associated to the isotope Id.

◆ get_z()

int materials::isotope::id::get_z ( ) const

Return the number of protons.

◆ is_valid()

bool materials::isotope::id::is_valid ( ) const

Check the validity of the isotope id.

◆ operator<()

bool materials::isotope::id::operator< ( const id ) const

Comparison operator.

◆ operator==()

bool materials::isotope::id::operator== ( const id ) const

Comparison operator.

◆ reset()

void materials::isotope::id::reset ( )

Reset.

◆ set()

void materials::isotope::id::set ( int  z_,
int  a_ 
)

Set the numbers of protons and nucleons.

◆ set_a()

void materials::isotope::id::set_a ( int  z_)

Set the number of nucleons.

◆ set_z()

void materials::isotope::id::set_z ( int  z_)

Set the number of protons.

◆ to_string() [1/2]

void materials::isotope::id::to_string ( std::string &  ) const

Export to a string identifier.

◆ to_string() [2/2]

std::string materials::isotope::id::to_string ( ) const

Return a string identifier.

◆ tree_dump()

virtual void materials::isotope::id::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.


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