Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

CIntConfigParam Class Reference

#include <CIntConfigParam.h>

Inheritance diagram for CIntConfigParam:

Inheritance graph
[legend]
Collaboration diagram for CIntConfigParam:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 CIntConfigParam (const string &rName, int nDefault=0)
 CIntConfigParam (const string &rName, int nLow, int nHigh, int nDefault=0)
virtual ~CIntConfigParam ()
 CIntConfigParam (const CIntConfigParam &aCIntConfigParam)
CIntConfigParamoperator= (const CIntConfigParam &aCIntConfigParam)
int operator== (const CIntConfigParam &aCIntConfigParam) const
int operator!= (const CIntConfigParam &rhs) const
bool getCheckrange () const
int getLow () const
int getHigh () const
int getOptionValue ()
 Parameter value as int.

virtual int SetValue (CTCLInterpreter &rInterp, CTCLResult &rResult, const char *pValue)
 Parse/validate.

virtual string GetParameterFormat ()
void setRange (int nLo, int nHi)
 CIntConfigParam (const string &rName, int nDefault=0)
 CIntConfigParam (const string &rName, int nLow, int nHigh, int nDefault=0)
virtual ~CIntConfigParam ()
 CIntConfigParam (const CIntConfigParam &aCIntConfigParam)
CIntConfigParamoperator= (const CIntConfigParam &aCIntConfigParam)
int operator== (const CIntConfigParam &aCIntConfigParam) const
int operator!= (const CIntConfigParam &rhs) const
bool getCheckrange () const
int getLow () const
int getHigh () const
int getOptionValue ()
 Parameter value as int.

virtual int SetValue (CTCLInterpreter &rInterp, CTCLResult &rResult, const char *pValue)
 Parse/validate.

virtual string GetParameterFormat ()
void setRange (int nLo, int nHi)

Protected Member Functions

void setCheckrange (const bool am_fCheckrange)
void setLow (const int am_nLow)
void setHigh (const int am_nHigh)
void setCheckrange (const bool am_fCheckrange)
void setLow (const int am_nLow)
void setHigh (const int am_nHigh)

Private Attributes

bool m_fCheckrange
 True if value has range limits.

int m_nLow
 Lowest allowed value for parameter.

int m_nHigh
 Highest allowed value for parameter.

int m_nValue
 Current parameter value as int.


Detailed Description

Represents an integer configuration parameter Integer configuration parametes appear as a keyword value pair. E.g.:
-vsn 5
might set a FERA virtual slot number to 5.

Definition at line 300 of file CIntConfigParam.h.


Constructor & Destructor Documentation

CIntConfigParam::CIntConfigParam const string &  rName,
int  nDefault = 0
 

Constructor. Creates an integer configuration parameter. This version of the constructor creates a parameter that is not range checked.

Parameters:
sName const string& [in] keyword by which the parameter is recognized.
nDefault int [in] Default (initial) value of the parameter.

Definition at line 306 of file CIntConfigParam.cpp.

References CConfigurationParameter::setValue().

CIntConfigParam::CIntConfigParam const string &  rName,
int  nLow,
int  nHigh,
int  nDefault = 0
 

Constructor: This version of the construtor creates a range checked parameter. Range checked parameters refuse to set themselves outside of the range [m_nLow, m_nHigh].

Parameters:
rName const string& [in] Name of the parameter to set.
nLow int [in] Low end of the range.
nHigh int [in] High end of the range.
nDefault int [in] Default (initial) parameter value.

Definition at line 331 of file CIntConfigParam.cpp.

CIntConfigParam::~CIntConfigParam  )  [virtual]
 

Destructor

Definition at line 345 of file CIntConfigParam.cpp.

CIntConfigParam::CIntConfigParam const CIntConfigParam rhs  ) 
 

Copy constructor.

Definition at line 353 of file CIntConfigParam.cpp.

CIntConfigParam::CIntConfigParam const string &  rName,
int  nDefault = 0
 

CIntConfigParam::CIntConfigParam const string &  rName,
int  nLow,
int  nHigh,
int  nDefault = 0
 

virtual CIntConfigParam::~CIntConfigParam  )  [virtual]
 

CIntConfigParam::CIntConfigParam const CIntConfigParam aCIntConfigParam  ) 
 


Member Function Documentation

bool CIntConfigParam::getCheckrange  )  const [inline]
 

Definition at line 337 of file include/CIntConfigParam.h.

References m_fCheckrange.

bool CIntConfigParam::getCheckrange  )  const [inline]
 

Definition at line 337 of file CIntConfigParam.h.

References m_fCheckrange.

int CIntConfigParam::getHigh  )  const [inline]
 

Definition at line 345 of file include/CIntConfigParam.h.

References m_nHigh.

int CIntConfigParam::getHigh  )  const [inline]
 

Definition at line 345 of file CIntConfigParam.h.

References m_nHigh.

int CIntConfigParam::getLow  )  const [inline]
 

Definition at line 341 of file include/CIntConfigParam.h.

References m_nLow.

int CIntConfigParam::getLow  )  const [inline]
 

Definition at line 341 of file CIntConfigParam.h.

References m_nLow.

int CIntConfigParam::getOptionValue  ) 
 

Parameter value as int.

int CIntConfigParam::getOptionValue  ) 
 

Parameter value as int.

Returns the integer value of the parameter. Note that construction will establish a well defined default parameter value.

Returns:
The value of the parameter.

Definition at line 411 of file CIntConfigParam.cpp.

References m_nValue.

Referenced by CReadOrder::Initialize(), CCAENV830Module::Initialize(), CCAENV792::Initialize(), CCAENV775::Initialize(), and CCAENModule::Initialize().

virtual string CIntConfigParam::GetParameterFormat  )  [virtual]
 

Implements CConfigurationParameter.

string CIntConfigParam::GetParameterFormat  )  [virtual]
 

Returns:
Returns the format of the parameter. In this case int

Implements CConfigurationParameter.

Definition at line 479 of file CIntConfigParam.cpp.

int CIntConfigParam::operator!= const CIntConfigParam rhs  )  const [inline]
 

Definition at line 330 of file include/CIntConfigParam.h.

References operator==().

int CIntConfigParam::operator!= const CIntConfigParam rhs  )  const [inline]
 

Definition at line 330 of file CIntConfigParam.h.

References operator==().

CIntConfigParam& CIntConfigParam::operator= const CIntConfigParam aCIntConfigParam  ) 
 

CIntConfigParam & CIntConfigParam::operator= const CIntConfigParam aCIntConfigParam  ) 
 

Definition at line 370 of file CIntConfigParam.cpp.

References m_fCheckrange, m_nHigh, m_nLow, m_nValue, and CConfigurationParameter::operator=().

int CIntConfigParam::operator== const CIntConfigParam aCIntConfigParam  )  const
 

int CIntConfigParam::operator== const CIntConfigParam rhs  )  const
 

Equality comparison. Objects are equal iff all members are equal.

Parameters:
rhs const CIntConfigParam& [in] Object we compare to.
Returns:
Any of:
  • true The objects are functionally equal.
  • false The objects are no functionally equal.

Definition at line 391 of file CIntConfigParam.cpp.

References m_fCheckrange, m_nHigh, m_nLow, m_nValue, and CConfigurationParameter::operator==().

Referenced by operator!=().

void CIntConfigParam::setCheckrange const bool  am_fCheckrange  )  [inline, protected]
 

Definition at line 355 of file include/CIntConfigParam.h.

References m_fCheckrange.

void CIntConfigParam::setCheckrange const bool  am_fCheckrange  )  [inline, protected]
 

Definition at line 355 of file CIntConfigParam.h.

References m_fCheckrange.

void CIntConfigParam::setHigh const int  am_nHigh  )  [inline, protected]
 

Definition at line 363 of file include/CIntConfigParam.h.

References m_nHigh.

void CIntConfigParam::setHigh const int  am_nHigh  )  [inline, protected]
 

Definition at line 363 of file CIntConfigParam.h.

References m_nHigh.

void CIntConfigParam::setLow const int  am_nLow  )  [inline, protected]
 

Definition at line 359 of file include/CIntConfigParam.h.

References m_nLow.

void CIntConfigParam::setLow const int  am_nLow  )  [inline, protected]
 

Definition at line 359 of file CIntConfigParam.h.

References m_nLow.

void CIntConfigParam::setRange int  nLo,
int  nHi
[inline]
 

Definition at line 378 of file include/CIntConfigParam.h.

References m_fCheckrange, m_nHigh, and m_nLow.

void CIntConfigParam::setRange int  nLo,
int  nHi
[inline]
 

Definition at line 378 of file CIntConfigParam.h.

References m_fCheckrange, m_nHigh, and m_nLow.

Referenced by CCAENModule::CCAENModule(), CCAENV775::CCAENV775(), CCAENV792::CCAENV792(), CCAENV830Module::CCAENV830Module(), and CReadOrder::CReadOrder().

virtual int CIntConfigParam::SetValue CTCLInterpreter &  rInterp,
CTCLResult &  rResult,
const char *  pValue
[virtual]
 

Parse/validate.

Implements CConfigurationParameter.

int CIntConfigParam::SetValue CTCLInterpreter &  rInterp,
CTCLResult &  rResult,
const char *  pValue
[virtual]
 

Parse/validate.

Sets the parameter value according to the next parameter on the command line. Errors can result if:

  • The value does not parse as an integer.
  • The value parses as an integer, however it is outside of the range [m_nLow, m_nHigh] and m_fCheckrange is true.

Parameters:
rInterp - CTCLInterpreter& [in] The interpreter that is setting the parameter.
rResult - CTCLResult& [in] The result string that will be set in case of error.
Value char* [in] The C null terminated string containing the potential value of the parameter.
Returns:
  • TCL_OK normal completion.
  • TCL_ERROR if one of the errors described above is encountered. In this case, the result string will be the error message.

Implements CConfigurationParameter.

Definition at line 439 of file CIntConfigParam.cpp.

References CConfigurationParameter::getSwitch(), m_fCheckrange, m_nHigh, m_nLow, and m_nValue.


Member Data Documentation

bool CIntConfigParam::m_fCheckrange [private]
 

True if value has range limits.

Definition at line 305 of file include/CIntConfigParam.h.

Referenced by getCheckrange(), operator=(), operator==(), setCheckrange(), setRange(), and SetValue().

int CIntConfigParam::m_nHigh [private]
 

Highest allowed value for parameter.

Definition at line 307 of file include/CIntConfigParam.h.

Referenced by getHigh(), operator=(), operator==(), setHigh(), setRange(), and SetValue().

int CIntConfigParam::m_nLow [private]
 

Lowest allowed value for parameter.

Definition at line 306 of file include/CIntConfigParam.h.

Referenced by getLow(), operator=(), operator==(), setLow(), setRange(), and SetValue().

int CIntConfigParam::m_nValue [private]
 

Current parameter value as int.

Definition at line 308 of file include/CIntConfigParam.h.

Referenced by getOptionValue(), operator=(), operator==(), and SetValue().


The documentation for this class was generated from the following files:
Generated on Fri Mar 12 13:04:35 2004 for Scripted Readout by doxygen 1.3.4