casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Static Public Member Functions | Static Public Attributes | Private Member Functions | Static Private Member Functions | List of all members
CSourceModel Class Reference

A helper class for the enumeration SourceModel. More...

#include <CSourceModel.h>

Static Public Member Functions

static int version ()
 Return the major version number as an int. More...
 
static std::string revision ()
 Return the revision as a string. More...
 
static unsigned int size ()
 Return the number of enumerators declared in SourceModelMod::SourceModel. More...
 
static std::string name (const SourceModelMod::SourceModel &e)
 Returns an enumerator as a string. More...
 
static std::string toString (const SourceModelMod::SourceModel &f)
 Equivalent to the name method. More...
 
static const std::vector
< std::string > 
names ()
 Returns vector of all the enumerators as strings. More...
 
static SourceModelMod::SourceModel newSourceModel (const std::string &name)
 Create a SourceModel enumeration object by specifying its name. More...
 
static SourceModelMod::SourceModel literal (const std::string &name)
 
static SourceModelMod::SourceModel from_int (unsigned int i)
 

Static Public Attributes

static const std::string & sGAUSSIAN
 Enumerators as strings. More...
 
static const std::string & sPOINT
 
static const std::string & sDISK
 

Private Member Functions

 CSourceModel ()
 
 CSourceModel (const CSourceModel &)
 
CSourceModeloperator= (const CSourceModel &)
 

Static Private Member Functions

static std::string badString (const std::string &name)
 
static std::string badInt (unsigned int i)
 

Detailed Description

A helper class for the enumeration SourceModel.

Definition at line 85 of file CSourceModel.h.

Constructor & Destructor Documentation

CSourceModel::CSourceModel ( )
private
CSourceModel::CSourceModel ( const CSourceModel )
private

Member Function Documentation

static std::string CSourceModel::badInt ( unsigned int  i)
staticprivate
static std::string CSourceModel::badString ( const std::string &  name)
staticprivate
static SourceModelMod::SourceModel CSourceModel::from_int ( unsigned int  i)
static

Return a SourceModel's enumerator given an unsigned int.

Parameters
ithe index of the enumerator in SourceModelMod::SourceModel.
Returns
a SourceModelMod::SourceModel's enumerator.
Exceptions
astring containing an error message if no enumerator could be found for this integer.
static SourceModelMod::SourceModel CSourceModel::literal ( const std::string &  name)
static

Return a SourceModel's enumerator given a string.

Parameters
namethe string representation of the enumerator.
Returns
a SourceModelMod::SourceModel's enumerator.
Exceptions
astring containing an error message if no enumerator could be found for this name.
static std::string CSourceModel::name ( const SourceModelMod::SourceModel &  e)
static

Returns an enumerator as a string.

Parameters
ean enumerator of SourceModelMod::SourceModel.
Returns
a string.
static const std::vector<std::string> CSourceModel::names ( )
static

Returns vector of all the enumerators as strings.

The strings are stored in the vector in the same order than the enumerators are declared in the enumeration.

Returns
a vector of string.
static SourceModelMod::SourceModel CSourceModel::newSourceModel ( const std::string &  name)
static

Create a SourceModel enumeration object by specifying its name.

CSourceModel& CSourceModel::operator= ( const CSourceModel )
private
static std::string CSourceModel::revision ( )
static

Return the revision as a string.

Returns
a string
static unsigned int CSourceModel::size ( )
static

Return the number of enumerators declared in SourceModelMod::SourceModel.

Returns
an unsigned int.
static std::string CSourceModel::toString ( const SourceModelMod::SourceModel &  f)
inlinestatic

Equivalent to the name method.

Definition at line 131 of file CSourceModel.h.

static int CSourceModel::version ( )
static

Return the major version number as an int.

Returns
an int.

Member Data Documentation

const std::string& CSourceModel::sDISK
static

A const string equal to "DISK".

Definition at line 96 of file CSourceModel.h.

const std::string& CSourceModel::sGAUSSIAN
static

Enumerators as strings.

A const string equal to "GAUSSIAN".

Definition at line 92 of file CSourceModel.h.

const std::string& CSourceModel::sPOINT
static

A const string equal to "POINT".

Definition at line 94 of file CSourceModel.h.


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