Bayeux  3.4.1
Core Foundation library for SuperNEMO
Public Member Functions | List of all members
geomtools::angular_range::iterator Class Reference

Forward iterator associated to an angular range. More...

#include <bayeux/geomtools/angular_range.h>

Inheritance diagram for geomtools::angular_range::iterator:
datatools::i_tree_dumpable

Public Member Functions

 iterator (const angular_range &ar_, unsigned int nsteps_=36)
 
unsigned int get_nsamples () const
 
int get_current_step () const
 Return the current step index. More...
 
double get_current_angle () const
 Return the current angle value. More...
 
bool is_at_first () const
 Check if the iterator is positioned at the first sample. More...
 
bool is_at_last () const
 Check if the iterator is positioned at the last sample. More...
 
bool is_finished () const
 Check if the iterator is finished (past-the-end) More...
 
void set_first ()
 Set the iterator at first position. More...
 
void set_last ()
 Set the iterator at last position. More...
 
void set_finished ()
 Set the iterator at finished (past-the-end) More...
 
void step ()
 Increment the iterator position by one unit. More...
 
void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
double operator * () const
 
iterator operator++ ()
 Increment operator. More...
 
bool operator! () const
 Check the validity of the iterator. 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

Forward iterator associated to an angular range.

Constructor & Destructor Documentation

◆ iterator()

geomtools::angular_range::iterator::iterator ( const angular_range ar_,
unsigned int  nsteps_ = 36 
)

Default constructor

  • the angular range to be traversed
  • the number of divisions

Member Function Documentation

◆ get_current_angle()

double geomtools::angular_range::iterator::get_current_angle ( ) const

Return the current angle value.

◆ get_current_step()

int geomtools::angular_range::iterator::get_current_step ( ) const

Return the current step index.

◆ get_nsamples()

unsigned int geomtools::angular_range::iterator::get_nsamples ( ) const

Return the number of angle samples (number of steps + 1)

Returns
the number of angle samples

◆ is_at_first()

bool geomtools::angular_range::iterator::is_at_first ( ) const

Check if the iterator is positioned at the first sample.

◆ is_at_last()

bool geomtools::angular_range::iterator::is_at_last ( ) const

Check if the iterator is positioned at the last sample.

◆ is_finished()

bool geomtools::angular_range::iterator::is_finished ( ) const

Check if the iterator is finished (past-the-end)

◆ operator *()

double geomtools::angular_range::iterator::operator * ( ) const

Indirection operator

Returns
the current sampled angle

◆ operator!()

bool geomtools::angular_range::iterator::operator! ( ) const

Check the validity of the iterator.

◆ operator++()

iterator geomtools::angular_range::iterator::operator++ ( )

Increment operator.

◆ set_finished()

void geomtools::angular_range::iterator::set_finished ( )

Set the iterator at finished (past-the-end)

◆ set_first()

void geomtools::angular_range::iterator::set_first ( )

Set the iterator at first position.

◆ set_last()

void geomtools::angular_range::iterator::set_last ( )

Set the iterator at last position.

◆ step()

void geomtools::angular_range::iterator::step ( )

Increment the iterator position by one unit.

◆ tree_dump()

void geomtools::angular_range::iterator::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: