Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

propertymanager.h

00001 /***************************************************************************
00002                     propertymanager.h  -  description
00003                             -------------------
00004     begin                : feb 06th, 2004
00005     copyright            : (C) 2003-2006 by Duong-Khang NGUYEN
00006     email                : neoneurone @ users sourceforge net
00007     
00008     $Id: propertymanager.h 63 2006-10-17 20:45:12Z neoneurone $
00009  ***************************************************************************/
00010 
00011 /***************************************************************************
00012  *                                                                         *
00013  *   This program is free software; you can redistribute it and/or modify  *
00014  *   it under the terms of the GNU General Public License as published by  *
00015  *   the Free Software Foundation; either version 2 of the License, or     *
00016  *   any later version.                                                    *
00017  *                                                                         *
00018  ***************************************************************************/
00019 
00020 #ifndef _OPENCITY_PROPERTYMANAGER_H_
00021 #define _OPENCITY_PROPERTYMANAGER_H 1
00022 
00023 #include "main.h"
00024 #include "conf.h"               // For models' configuration files
00025 
00026 #include <vector>
00027 
00028 class Structure;
00029 
00030 
00031 //========================================================================
00038 class PropertyManager
00039 {
00040 public:
00041     PropertyManager();
00042     ~PropertyManager();
00043 
00044 
00045 //========================================================================
00053     const int
00054     Get(
00055         const OPENCITY_PROPERTY_CODE & pCode,
00056         const OPENCITY_STRUCTURE_CODE & sCode,
00057         const Structure* pcStruct = NULL ) const;
00058 
00059 
00060 //========================================================================
00067     const OPENCITY_GRAPHIC_CODE
00068     GetGC(
00069         const OPENCITY_STRUCTURE_CODE scode ) const;
00070 
00071 
00072 //========================================================================
00076     const OPENCITY_STRUCTURE_TYPE
00077     GetST(
00078         const OPENCITY_STRUCTURE_CODE scode ) const;
00079 
00080 
00081 //========================================================================
00091     void
00092     GetWLH(
00093         const OPENCITY_GRAPHIC_CODE & gcode,
00094         uint & w, const uint defw,
00095         uint & l, const uint defl,
00096         uint & h, const uint defh);
00097 
00098 
00099 private:
00100     std::vector<Conf*>  vpConf;         
00101 
00102 
00103 
00104 
00105 //========================================================================
00114     const string
00115     propertymanagerGetStr(
00116         const OPENCITY_GRAPHIC_CODE & gcode,
00117         const string & key,
00118         const string & def = "");
00119 
00120 
00121     const OPENCITY_ERR_CODE
00122     propertymanagerGetLint(
00123         const OPENCITY_GRAPHIC_CODE & gcode,
00124         const string & key,
00125         OC_LINT & rlint,
00126         const OC_LINT & def = 0);
00127 };
00128 
00129 #endif
00130 
00131 
00132 
00133 
00134 
00135 
00136 
00137 
00138 
00139 
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00151 
00152 
00153 
00154 
00155 
00156 
00157 
00158 
00159 
00160 
00161 

Generated on Sat Nov 11 10:21:10 2006 for OpenCity by  doxygen 1.4.2