27#ifndef included_Retro_RtclArgs
28#define included_Retro_RtclArgs 1
44 const static int8_t
int8_min = std::numeric_limits<int8_t>::min();
45 const static int8_t
int8_max = std::numeric_limits<int8_t>::max();
46 const static uint8_t
uint8_max = std::numeric_limits<uint8_t>::max();
47 const static int16_t
int16_min = std::numeric_limits<int16_t>::min();
48 const static int16_t
int16_max = std::numeric_limits<int16_t>::max();
49 const static uint16_t
uint16_max = std::numeric_limits<uint16_t>::max();
50 const static int32_t
int32_min = std::numeric_limits<int32_t>::min();
51 const static int32_t
int32_max = std::numeric_limits<int32_t>::max();
52 const static uint32_t
uint32_max = std::numeric_limits<uint32_t>::max();
55 RtclArgs(Tcl_Interp* interp,
int objc,
56 Tcl_Obj*
const objv[],
size_t nskip=1);
60 Tcl_Interp*
Interp()
const;
62 Tcl_Obj*
const *
Objv()
const;
63 Tcl_Obj*
Objv(
size_t ind)
const;
65 bool GetArg(
const char* name, Tcl_Obj*& pval);
67 bool GetArg(
const char* name,
const char*& val);
68 bool GetArg(
const char* name, std::string& val);
70 bool GetArg(
const char* name, int8_t& val,
72 bool GetArg(
const char* name, uint8_t& val,
74 bool GetArg(
const char* name, int16_t& val,
76 bool GetArg(
const char* name, uint16_t& val,
78 bool GetArg(
const char* name, int32_t& val,
80 bool GetArg(
const char* name, uint32_t& val,
83 bool GetArg(
const char* name,
float& val,
84 float min=-1.e30,
float max=+1.e30);
85 bool GetArg(
const char* name,
double& val,
86 double min=-1.e30,
double max=+1.e30);
88 bool GetArg(
const char* name, std::vector<uint8_t>& val,
90 bool GetArg(
const char* name, std::vector<uint16_t>& val,
93 bool Config(
const char* name, std::string& val);
94 bool Config(
const char* name, uint32_t& val,
105 size_t NDone()
const;
123 int Quit(
const std::string& str);
128 bool NextArg(
const char* name, Tcl_Obj*& pobj);
130 Tcl_Obj**& objv,
size_t lmin=0,
void ConfigNameCheck(const char *name)
FIXME_docs.
Tcl_Obj * CurrentArg() const
FIXME_docs.
bool NextOpt(std::string &val)
FIXME_docs.
static const int32_t int32_min
static const int16_t int16_max
const char * PeekArgString(int rind) const
FIXME_docs.
void AppendResultLines(const std::string &str)
FIXME_docs.
Tcl_Obj *const * Objv() const
FIXME_docs.
Tcl_Obj * operator[](size_t ind) const
FIXME_docs.
int NextSubOpt(std::string &val, const RtclNameSet &optset)
FIXME_docs.
bool fArgErr
argument processing error flag
bool GetArg(const char *name, Tcl_Obj *&pval)
FIXME_docs.
RtclArgs()
Default constructor.
size_t fNOptMiss
number of missed optional args
Tcl_Obj *const * fObjv
original args vector
static const int8_t int8_max
bool Config(const char *name, std::string &val)
FIXME_docs.
size_t fNConfigRead
number of read mode config's
void AppendResult(const char *str,...)
FIXME_docs.
bool OptValid() const
FIXME_docs.
static const int8_t int8_min
bool fOptErr
option processing error flag
int Quit(const std::string &str)
FIXME_docs.
static const uint8_t uint8_max
static const int32_t int32_max
bool ConfigReadCheck()
FIXME_docs.
void SetResult(const std::string &str)
FIXME_docs.
int Objc() const
FIXME_docs.
static const uint16_t uint16_max
size_t fNDone
number of processed args
bool NextArgList(const char *name, int &objc, Tcl_Obj **&objv, size_t lmin=0, size_t lmax=uint32_max)
FIXME_docs.
static const int16_t int16_min
bool NextArg(const char *name, Tcl_Obj *&pobj)
FIXME_docs.
static const uint32_t uint32_max
size_t NOptMiss() const
FIXME_docs.
Tcl_Interp * fpInterp
pointer to tcl interpreter
size_t NDone() const
FIXME_docs.
Tcl_Interp * Interp() const
FIXME_docs.
bool AllDone()
FIXME_docs.
size_t fObjc
original args count
Declaration of class ReventLoop.