Bayeux
3.4.1
Core Foundation library for SuperNEMO
|
A class representing a version ID : More...
#include <bayeux/datatools/version_id.h>
Classes | |
struct | tags |
Public Member Functions | |
version_id () | |
version_id (const std::string &tag_) | |
version_id (int major_, int minor_=-1, int revision_=-1, const std::string &tag_="") | |
bool | is_valid () const |
bool | has_numbers_only () const |
void | reset () |
bool | has_major () const |
bool | has_major_only () const |
int | get_major () const |
void | set_major (int) |
bool | has_minor () const |
int | get_minor () const |
void | set_minor (int) |
bool | has_revision () const |
int | get_revision () const |
void | set_revision (int) |
bool | has_tag () const |
bool | has_tag_number () const |
bool | has_tag_only () const |
bool | has_numeric_tag () const |
bool | has_special_tag () const |
const std::string & | get_tag () const |
int | get_tag_number () const |
void | set_tag (const std::string &) |
bool | equals (const version_id &, bool ignore_tag_=false) const |
bool | operator== (const version_id &) const |
int | compare (const version_id &, bool major_only_=false) const |
bool | matches (const std::string &version_rules_, bool major_only_=false) const |
void | to_string (std::string &format_) const |
std::string | to_string () const |
bool | from_string (const std::string &) |
void | dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="") const |
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 int | compare (const version_id &vid0_, const version_id &vid1_, bool major_only=false) |
static bool | are_orderable (const version_id &vid0_, const version_id &vid1_, bool major_only_=false) |
static const version_id & | invalid () |
Return an invalid version identifier. More... | |
Static Public Attributes | |
static const int32_t | INVALID_NUMBER |
static const char | INVALID_SYMBOL |
static const char | NUMERIC_SEPARATOR |
static const char | TAG_SEPARATOR |
static const int32_t | MAX_RC_NUM |
static const int32_t | ALPHA_NUM |
static const int32_t | BETA_NUM |
static const int32_t | RC_BASE_NUM |
Friends | |
std::ostream & | operator<< (std::ostream &, const version_id &) |
std::istream & | operator>> (std::istream &, version_id &) |
A class representing a version ID :
Supported formats are:
Version ID objects can be relatively ordered unless :
Version ID objects can also be converted to and parsed from character strings.
Version ID can be checked to match version requirements (version rules) :
Examples :
Version ID can be invalidated : format is then "?"
datatools::version_id::version_id | ( | ) |
|
explicit |
datatools::version_id::version_id | ( | int | major_, |
int | minor_ = -1 , |
||
int | revision_ = -1 , |
||
const std::string & | tag_ = "" |
||
) |
|
static |
int datatools::version_id::compare | ( | const version_id & | , |
bool | major_only_ = false |
||
) | const |
|
static |
void datatools::version_id::dump | ( | std::ostream & | out_ = std::clog , |
const std::string & | title_ = "" , |
||
const std::string & | indent_ = "" |
||
) | const |
bool datatools::version_id::equals | ( | const version_id & | , |
bool | ignore_tag_ = false |
||
) | const |
bool datatools::version_id::from_string | ( | const std::string & | ) |
int datatools::version_id::get_major | ( | ) | const |
int datatools::version_id::get_minor | ( | ) | const |
int datatools::version_id::get_revision | ( | ) | const |
const std::string& datatools::version_id::get_tag | ( | ) | const |
int datatools::version_id::get_tag_number | ( | ) | const |
bool datatools::version_id::has_major | ( | ) | const |
bool datatools::version_id::has_major_only | ( | ) | const |
bool datatools::version_id::has_minor | ( | ) | const |
bool datatools::version_id::has_numbers_only | ( | ) | const |
bool datatools::version_id::has_numeric_tag | ( | ) | const |
bool datatools::version_id::has_revision | ( | ) | const |
bool datatools::version_id::has_special_tag | ( | ) | const |
bool datatools::version_id::has_tag | ( | ) | const |
bool datatools::version_id::has_tag_number | ( | ) | const |
bool datatools::version_id::has_tag_only | ( | ) | const |
|
static |
Return an invalid version identifier.
bool datatools::version_id::is_valid | ( | ) | const |
bool datatools::version_id::matches | ( | const std::string & | version_rules_, |
bool | major_only_ = false |
||
) | const |
bool datatools::version_id::operator== | ( | const version_id & | ) | const |
void datatools::version_id::reset | ( | ) |
void datatools::version_id::set_major | ( | int | ) |
void datatools::version_id::set_minor | ( | int | ) |
void datatools::version_id::set_revision | ( | int | ) |
void datatools::version_id::set_tag | ( | const std::string & | ) |
void datatools::version_id::to_string | ( | std::string & | format_ | ) | const |
std::string datatools::version_id::to_string | ( | ) | const |
|
friend |
|
friend |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |