home *** CD-ROM | disk | FTP | other *** search
- #include "CmdLine.h"
-
- #include <RJS/Convert.h>
-
- RJS_CmdOpt_int::RJS_CmdOpt_int(const char *k, RJS_CmdOpt::CmdOptFlags f)
- : RJS_CmdOpt(k,f|Value)
- {
- val=0;
- }
-
- RJS_CmdOpt_int::RJS_CmdOpt_int(const char *k, const RJS_String &dv, RJS_CmdOpt::CmdOptFlags f)
- : RJS_CmdOpt(k,dv,f)
- {
- val=0;
- }
-
- int RJS_CmdOpt_int::set_value()
- {
- val=RJS_Convert::toInt(RJS_CmdOpt::val);
- if (RJS_Convert::ok()) return 1; else return 0;
- }
-
- const char *RJS_CmdOpt_int::value_type()
- {
- return "integer";
- }
-
- void RJS_CmdOpt_int::reset()
- {
- val=0;
- RJS_CmdOpt::reset();
- }
-
- void RJS_CmdOpt_int::dump()
- {
- RJS_CmdOpt::dump();
- cout << "int: " << value() << endl;
- }
-