#include <iostream>
#include <list>
#include <vector>
#include <string>
#include "clop.H"
Go to the source code of this file.
|
const string | stripdir (const string &pname) |
|
void | AddOp (const string &lo, const char &so) |
|
bool | CheckOps (const vector< string > &args, string &badop) |
|
bool | GetOp (const string &ops, const vector< string > &args) |
|
bool | GetOp (const string &ops, string &rv, const vector< string > &args) |
|
vector< string > | Vectize (const char **in) |
|
vector< string > | Vectize (const char **in, int n) |
|
void AddOp |
( |
const string & |
lo, |
|
|
const char & |
so |
|
) |
| |
Definition at line 52 of file clop.C.
References cloption_list.
*********************************************************************Illinois Open Source License ****University of Illinois NCSA **Open Source License University of Illinois All rights reserved ****Developed free of to any person **obtaining a copy of this software and associated documentation to deal with the Software without including without limitation the rights to and or **sell copies of the and to permit persons to whom the **Software is furnished to do so
list< clop > cloption_list
bool CheckOps |
( |
const vector< string > & |
args, |
|
|
string & |
badop |
|
) |
| |
Definition at line 61 of file clop.C.
References cloption_list.
63 vector<string>::const_iterator ai = args.begin();
65 while(ai != args.end()){
72 option_string = (*ai).substr(2);
77 if(oi->longop() == option_string)
81 if((*ai)[1] == oi->shortop())
list< clop > cloption_list
bool GetOp |
( |
const string & |
ops, |
|
|
const vector< string > & |
args |
|
) |
| |
Definition at line 97 of file clop.C.
References cloption_list.
109 vector<string>::const_iterator ai = args.begin();
110 while(ai != args.end()){
113 if((*ai)[1] == oi->shortop()){
117 else if((*ai)[1] ==
'-'){
118 string op((*ai).substr(2));
119 if(op == oi->longop()){
list< clop > cloption_list
bool GetOp |
( |
const string & |
ops, |
|
|
string & |
rv, |
|
|
const vector< string > & |
args |
|
) |
| |
Definition at line 132 of file clop.C.
References cloption_list.
146 vector<string>::const_iterator ai = args.begin();
147 while(ai != args.end()){
150 if((*ai)[1] == oi->shortop()){
161 else if((*ai)[1] ==
'-'){
162 string op((*ai).substr(2));
163 if(op == oi->longop()){
list< clop > cloption_list
const string stripdir |
( |
const string & |
pname | ) |
|
Definition at line 41 of file clop.C.
References x.
44 string::size_type
x = pname.find(
"/");
47 return(pname.substr(pname.find_last_of(
"/")+1));
vector<string> Vectize |
( |
const char ** |
in | ) |
|
Definition at line 182 of file clop.C.
References i.
Referenced by main().
184 vector<string> retVal;
187 retVal.push_back(in[i++]);
vector<string> Vectize |
( |
const char ** |
in, |
|
|
int |
n |
|
) |
| |
Definition at line 192 of file clop.C.
References i.
194 vector<string> retVal;
195 if(
n <= 0)
return retVal;
197 while((in[i] != NULL) && i <
n)
198 retVal.push_back(in[i++]);