Skip to content

Commit

Permalink
interim
Browse files Browse the repository at this point in the history
  • Loading branch information
h-dh committed Aug 10, 2015
1 parent d915fc0 commit f5ccd62
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 141 deletions.
13 changes: 6 additions & 7 deletions include/annotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
This can be done for each variable. Specification of
a certain level alone as well as of a common directive
is optional.\n
Components of a directive: L1, L2, L3, D, EM, ST, PT, flag, var, V=value\n
Components of a directive: L1, L2, L3, D, EM, VR, PT, flag, var, V=value\n
L1 Notifiy pecularities. Continue unrestricted.\n
L2 Continue checking to the end of the file. Then, lock
processing of the current variable.\n
L3 Stop immediately (but complete meta-data checks). Lock
processing of current variable.\n
L4 Stop immediately and shutdown the QA session (no locks).\n
Table: Standard Output Table (ST), Project Table (PT)\n
Table: Standard Output Table (VR), Project Table (PT)\n
Flag: Given in column 1. Must match in the QA.cpp class.\n
Task: Email notification (EM), discard the check/test (D)\n
Variable: A list of comma-separated acronyms of variables; directive is \n
Expand All @@ -41,7 +41,7 @@
Record: Exclude record(s) from being checked. A range may be specified, e.g. 1-12.\n
Multiple occurrences of R in a braced statement are possible.\n
Note: counting of numbers starts with one.
Default directives: {ST,L1}, {PT,L2,EM}, {L3,EM}.
Default directives: {VR,L1}, {PT,L2,EM}, {L3,EM}.
*/
class Annotation : public IObj
{
Expand All @@ -55,7 +55,7 @@ class Annotation : public IObj
bool init(void) ;
void linkObject(IObj *){;}
void setFilename(std::string name);
void setFilePath(std::string s){path=s;}
void setFilePath(std::string s) {filenameItems.path=s;}
void setProject(std::string s){project=s;}
void setTablePath(std::string p){ tablePath=p; }

Expand Down Expand Up @@ -161,8 +161,7 @@ class Annotation : public IObj

size_t recErrCountLimit;

std::string filename;
std::string path;
struct hdhC::FilenameItems filenameItems;
std::string project;
std::string tablePath;

Expand All @@ -173,7 +172,7 @@ class Annotation : public IObj
std::vector<std::string> code; // from check_list.txt
std::vector<size_t> count; // number of of occurences
std::vector<std::string> level; // L1, ... ,L4
std::vector<std::string> table; // ST/PT: standard/project
std::vector<std::string> table; // VR/PT: standard/project
std::vector<std::string> task; // D/E/S/W: disable/error/warning
std::vector<std::string> text; // user-provided headlines
std::vector<std::string> var; // acronym; name
Expand Down
9 changes: 5 additions & 4 deletions include/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ class Base : public IObj
bool isVarname( std::string &);
void makeVariable (NcAPI *, std::string name, int id=-1);

void setFilename(std::string s){filename=s;}
void setFilePath(std::string p){filePath=p;}
// uses struct hdhC::FilenameItems
void setFilename(std::string);
void setFilePath(std::string p) {filenameItems.path=p;}

//! Connect a frequency distribution object.
void setFreqDistI(FD_interface *p){ fDI=p; return;}
Expand All @@ -112,8 +113,8 @@ class Base : public IObj
void setVarPropsForOperation( void );
void setVarPropsNoOperation( void );

std::string filename;
std::string filePath;
struct hdhC::FilenameItems filenameItems;

std::string linkObjName;
bool isAllocate;
std::vector<std::string> srcStr;
Expand Down
6 changes: 4 additions & 2 deletions include/cf.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ class CF : public IObj
bool entry(void);
bool init(void) ;
void linkObject(IObj *);
void setFilename(std::string s){;}
void setFilePath(std::string p){;}
void setFilename(std::string s);
void setFilePath(std::string p) {filenameItems.path=p;}
void setTablePath(std::string p){ tablePath=p; }


Expand Down Expand Up @@ -219,6 +219,8 @@ template <typename T>
bool isFeatureType;
std::string cFVersion;

struct hdhC::FilenameItems filenameItems;

ut_system* unitSystem;

std::string std_name_table;
Expand Down
6 changes: 3 additions & 3 deletions include/fd_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class FD_interface : public IObj
/*! A previous session might be resumed.*/
bool init(void);
void linkObject(IObj *);
void setFilename(std::string name){;}
void setFilePath(std::string s){;}
void setFilename(std::string name);
void setFilePath(std::string p) {filenameItems.path=p;}
void setTablePath(std::string p){ ; }

//! Settings by options.
Expand Down Expand Up @@ -102,7 +102,7 @@ class FD_interface : public IObj
{srcStr.push_back(s); return;}

int identNum;
std::string filename;
struct hdhC::FilenameItems filenameItems;
std::string vName;
std::vector<std::string> srcStr;

Expand Down
12 changes: 8 additions & 4 deletions include/hdhC.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct FieldDataMeta
size_t size;
};

struct FileComponent
struct FilenameItems
{
bool is;
std::string file;
Expand Down Expand Up @@ -259,9 +259,6 @@ uint32_t
fletcher32_LE_clear( T *data, size_t sz, bool *reset, size_t clear=0);

//! Extract path, discard the filename.
struct FileComponent
splitFile(std::string&) ;

std::string
getPath(std::string&, bool isWithSlash=false );

Expand All @@ -283,6 +280,9 @@ getPathComponents(std::string &str, std::string &path,
std::string &fName, std::string &base,
std::string &ext);

struct FilenameItems
setFilename(std::string&) ;

//! Invert the ordering of bits
/*! For any type of T*/
template <typename T>
Expand Down Expand Up @@ -451,6 +451,10 @@ clearInternalMultipleSpaces(std::string &str );
std::string
clearSpaces(std::string &str );

//! concatenate a string-vector to a comma-separated (with blanks) string
std::string
catVector2Str(std::vector<std::string>&);

std::string
sAssign(std::string lvalue, std::string rvalue) ;

Expand Down
2 changes: 1 addition & 1 deletion include/in_file.h
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class InFile : public Base

//! Store the path to the netcdf file.
void setFilename(std::string);
void setFilePath(std::string);
void setFilePath(std::string p) {filenameItems.path=p;}

bool enableEntry;
bool isInfNan;
Expand Down

0 comments on commit f5ccd62

Please sign in to comment.