#include <cccc_opt.h>
Definition at line 40 of file cccc_opt.h.
void CCCC_Options::Add_Option |
( |
CCCC_Item & |
option_line | ) |
|
|
static |
Definition at line 90 of file cccc_opt.cc.
93 bool retval=option.Extract(first_token);
99 else if(first_token==
"CCCC_FileExt")
103 else if(first_token==
"CCCC_MetTmnt")
107 else if(first_token==
"CCCC_Dialect")
static void add_file_extension(CCCC_Item &fileext_line)
void add_treatment(CCCC_Item &treatment_line)
static void add_dialect_keyword(CCCC_Item &dialect_keyword_line)
string CCCC_Options::dialectKeywordPolicy |
( |
const string & |
lang, |
|
|
const string & |
kw |
|
) |
| |
|
static |
Definition at line 264 of file cccc_opt.cc.
267 dialect_keyword_map_t::key_type kt(lang,kw);
271 retval=(*iter).second;
static dialect_keyword_map_t dialect_keyword_map
string CCCC_Options::getFileLanguage |
( |
const string & |
filename | ) |
|
|
static |
Definition at line 220 of file cccc_opt.cc.
224 file_extension_language_map_t::iterator iter;
226 unsigned int extpos=filename.rfind(
".");
227 if(extpos!=string::npos)
229 extension=filename.substr(extpos);
233 retval=(*iter).second;
241 retval=(*iter).second;
246 cerr <<
"No language found for extension " << extension.c_str() << endl;
static file_extension_language_map_t extension_map
Metric_Treatment * CCCC_Options::getMetricTreatment |
( |
const string & |
metric_tag | ) |
|
|
static |
Definition at line 253 of file cccc_opt.cc.
256 metric_treatment_map_t::iterator iter=
treatment_map.find(metric_tag);
259 retval=(*iter).second;
static metric_treatment_map_t treatment_map
void CCCC_Options::Load_Options |
( |
const string & |
filename | ) |
|
|
static |
Definition at line 164 of file cccc_opt.cc.
166 ifstream optstr(filename.c_str());
bool FromFile(ifstream &ifstr)
static void Add_Option(CCCC_Item &option_line)
void CCCC_Options::Load_Options |
( |
| ) |
|
|
static |
Definition at line 182 of file cccc_opt.cc.
186 const char **option_ptr;
189 while( (*option_ptr)!=NULL)
191 string option_string=
"CCCC_FileExt@";
192 option_string+=(*option_ptr);
199 while( (*option_ptr)!=NULL)
201 string option_string=
"CCCC_MetTmnt@";
202 option_string+=(*option_ptr);
209 while( (*option_ptr)!=NULL)
211 string option_string=
"CCCC_Dialect@";
212 option_string+=(*option_ptr);
const char * default_treatment_options[]
const char * default_dialect_options[]
static void Add_Option(CCCC_Item &option_line)
const char * default_fileext_options[]
void CCCC_Options::Save_Options |
( |
const string & |
filename | ) |
|
|
static |
Definition at line 118 of file cccc_opt.cc.
120 ofstream optstr(filename.c_str());
121 file_extension_language_map_t::iterator felIter;
127 extLine.
Insert(
"CCCC_FileExt");
128 extLine.
Insert((*felIter).first.c_str());
129 extLine.
Insert((*felIter).second.c_str());
133 metric_treatment_map_t::iterator tIter;
139 tmtLine.
Insert(
"CCCC_MetTmnt");
140 tmtLine.
Insert((*tIter).second->code);
141 tmtLine.
Insert((*tIter).second->lower_threshold);
142 tmtLine.
Insert((*tIter).second->upper_threshold);
143 tmtLine.
Insert((*tIter).second->numerator_threshold);
144 tmtLine.
Insert((*tIter).second->width);
145 tmtLine.
Insert((*tIter).second->precision);
146 tmtLine.
Insert((*tIter).second->name);
150 dialect_keyword_map_t::iterator dkIter;
156 dkLine.
Insert(
"CCCC_Dialect");
157 dkLine.
Insert((*dkIter).first.first);
158 dkLine.
Insert((*dkIter).first.second);
159 dkLine.
Insert((*dkIter).second);
bool Insert(const string &s)
static file_extension_language_map_t extension_map
static dialect_keyword_map_t dialect_keyword_map
static metric_treatment_map_t treatment_map
bool ToFile(ofstream &ofstr)
The documentation for this class was generated from the following files: