All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tesseract::Param Class Reference

#include <params.h>

Inheritance diagram for tesseract::Param:
tesseract::BoolParam tesseract::DoubleParam tesseract::IntParam tesseract::StringParam

Public Member Functions

 ~Param ()
 
const char * name_str () const
 
const char * info_str () const
 
bool is_init () const
 
bool is_debug () const
 
bool constraint_ok (SetParamConstraint constraint) const
 

Protected Member Functions

 Param (const char *name, const char *comment, bool init)
 

Protected Attributes

const char * name_
 
const char * info_
 
bool init_
 
bool debug_
 

Detailed Description

Definition at line 113 of file params.h.

Constructor & Destructor Documentation

tesseract::Param::~Param ( )
inline

Definition at line 115 of file params.h.

115 {}
tesseract::Param::Param ( const char *  name,
const char *  comment,
bool  init 
)
inlineprotected

Definition at line 132 of file params.h.

132  :
133  name_(name), info_(comment), init_(init) {
134  debug_ = (strstr(name, "debug") != NULL) || (strstr(name, "display"));
135  }
const char * info_
Definition: params.h:138
name_table name
const char * name_
Definition: params.h:137
#define NULL
Definition: host.h:144

Member Function Documentation

bool tesseract::Param::constraint_ok ( SetParamConstraint  constraint) const
inline

Definition at line 121 of file params.h.

121  {
122  return (constraint == SET_PARAM_CONSTRAINT_NONE ||
123  (constraint == SET_PARAM_CONSTRAINT_DEBUG_ONLY &&
124  this->is_debug()) ||
125  (constraint == SET_PARAM_CONSTRAINT_NON_DEBUG_ONLY &&
126  !this->is_debug()) ||
127  (constraint == SET_PARAM_CONSTRAINT_NON_INIT_ONLY &&
128  !this->is_init()));
129  }
bool is_debug() const
Definition: params.h:120
bool is_init() const
Definition: params.h:119
const char* tesseract::Param::info_str ( ) const
inline

Definition at line 118 of file params.h.

118 { return info_; }
const char * info_
Definition: params.h:138
bool tesseract::Param::is_debug ( ) const
inline

Definition at line 120 of file params.h.

120 { return debug_; }
bool tesseract::Param::is_init ( ) const
inline

Definition at line 119 of file params.h.

119 { return init_; }
const char* tesseract::Param::name_str ( ) const
inline

Definition at line 117 of file params.h.

117 { return name_; }
const char * name_
Definition: params.h:137

Member Data Documentation

bool tesseract::Param::debug_
protected

Definition at line 140 of file params.h.

const char* tesseract::Param::info_
protected

Definition at line 138 of file params.h.

bool tesseract::Param::init_
protected

Definition at line 139 of file params.h.

const char* tesseract::Param::name_
protected

Definition at line 137 of file params.h.


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