Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

unit_level.h

Go to the documentation of this file.
00001 /* unit_level.h    $Revision: 1.2 $ $Date: 2005/12/10 20:33:54 $
00002    Copyright (C) 2000 University of Bonn.
00003    http://www.ikp.uni-bonn.de/boss
00004 
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009 
00010    This program is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013    GNU General Public License for more details.
00014 
00015    You should have received a copy of the GNU General Public License
00016    along with this program; if not, write to the Free Software
00017    Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA  02111-1307, USA.
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         //BOSS_Node::Node_Type nodeType;
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  //end of boss_unitselection group
00130 #endif
00131 

Generated on Tue Dec 20 23:14:38 2005 for BOSS by doxygen 1.3.6