00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00026 #ifndef UNIT_LEVEL_H
00027 #define UNIT_LEVEL_H
00028
00029 using namespace std;
00030
00031 #include <string>
00032 #include <vector>
00033 #include "boss_utility/boss_config.h"
00034 #include "boss_node.h"
00035 #include "boss_utility/dom_userdata.h"
00036
00045 struct PreSelAttr {
00047 string column;
00049 string value;
00050 };
00051
00052
00053
00057 typedef vector< PreSelAttr > PSA_Vector;
00058
00059
00065 class UnitLevel {
00067 BOSS::Config & cl;
00069 string name;
00071 string tag;
00073 UnitLevel * next;
00075 vector< PSA_Vector > attrMatrix;
00076
00077 DOM_UserData::Node_Type nodeType;
00079 string preselectionFileFlag;
00080
00081 bool isComment(const string & s);
00082 void loadPreSelQueries();
00083 void loadPreSelFile(const string & file, vector< PSA_Vector > & ps);
00084 public:
00093 UnitLevel(BOSS::Config & config, string levelName, string elementTag,
00094 DOM_UserData::Node_Type type,
00095 string fileFlag, UnitLevel * nextLevel
00096 ) : cl(config), name(levelName), tag(elementTag), nodeType(type),
00097 preselectionFileFlag(fileFlag), next(nextLevel)
00098 {
00099 loadPreSelQueries();
00100 }
00105 string getName() { return name; }
00110 string getTag() { return tag; }
00115 UnitLevel * getNextLevel() { return next; }
00120 DOM_UserData::Node_Type getNodeType() { return nodeType; }
00125 vector< PSA_Vector > getAttrMatrix() { return attrMatrix; }
00126 int checkMatrixSize();
00127 };
00128
00130 #endif
00131