Go to the documentation of this file. 1 #ifndef __JEEP__JARGS__
2 #define __JEEP__JARGS__
16 namespace JPP {
using namespace JEEP; }
42 JArgs(
const int argc,
const char*
const argv[])
48 for (
int i = 1; i != argc; ++i) {
66 JArgs(
const std::string&
PID, JArgs::const_iterator __begin, JArgs::const_iterator __end)
70 for (const_iterator i = __begin; i != __end; ++i) {
81 JArgs(
const std::string& buffer)
85 istringstream is(buffer);
89 for (
string word; is >> word; ) {
101 std::string
str(
const char ws =
' ')
const
103 std::string buffer =
PID;
105 for (const_iterator i = this->begin(); i != this->end(); ++i) {
120 const char*
c_str(
const char ws =
' ')
const
122 static std::string buffer;
124 buffer = this->
str(ws);
126 return buffer.c_str();
141 for (std::string buffer; in >> buffer; ) {
142 args.push_back(buffer);
160 for (JArgs::const_iterator i = args.begin(); i != args.end(); ++i) {
JArgs(const std::string &PID, JArgs::const_iterator __begin, JArgs::const_iterator __end)
Constructor.
std::string str(const char ws=' ') const
Convert to string consisting of sequence of tokens separated by given white space character.
Data structure to store command line arguments.
General puprpose classes and methods.
const char * c_str(const char ws=' ') const
Convert to character array consisting of sequence of tokens separated by given white space character.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
friend std::ostream & operator<<(std::ostream &out, const JArgs &args)
Stream output.
JArgs(const std::string &buffer)
Constructor.
JArgs()
Default constructor.
JArgs(const int argc, const char *const argv[])
Constructor.
friend std::istream & operator>>(std::istream &in, JArgs &args)
Stream input.