NIREP
|
00001 /*************************************************************************************** 00002 * Programmer: Jeffrey Hawley 00003 * Date: 07/21/09 00004 * Name: DisplayAttributes 00005 * Purpose: This class holds the attributes of a display. These would be the number of 00006 * rows, columns, locking the cursors, turning on and off the cursors, etc. 00007 ******************************************************************************************/ 00008 00009 00010 #pragma once 00011 00012 /* +-----------+ 00013 | Libraries | 00014 +-----------+ */ 00015 #include "wx/wxprec.h" 00016 00017 #ifndef WX_PRECOMP 00018 #include "wx/wx.h" 00019 #endif 00020 00021 #include "stdio.h" 00022 #include <string> 00023 #include <map> 00024 #include <vector> 00025 00026 #include <iostream> 00027 #include <fstream> 00028 00029 #include "NIREPDefinitions.h" 00030 00031 class DisplayAttributes 00032 { 00033 public: 00036 DisplayAttributes(){Init();}; 00037 00040 DisplayAttributes(const std::string& fileName); //Constructor 00041 00044 ~DisplayAttributes(){} //Constructor 00045 00048 bool Read(const std::string& fileName); 00049 00052 void Write(const std::string& fileName); 00053 00054 std::map<std::string, std::vector<std::vector<std::string> > > * GetAttributes(){return &attributes;}; 00055 00058 int GetRowDimension(){return rowDimension;}; //This is the number of rows in the displayDescription grid 00059 00062 int GetColDimension(){return colDimension;}; //This is the number of columns in the displayDescription 00063 00066 void SetRowDimension(int RD){rowDimension = RD;}; 00067 00070 void SetColDimension(int CD){colDimension = CD;}; 00071 00072 00073 bool AnyError(){return error;}; 00074 protected: 00075 00076 private: 00077 void Init(); 00078 00079 std::map<std::string, std::vector<std::vector<std::string> > > attributes; 00080 bool error; 00081 00082 int rowDimension; 00083 int colDimension; 00084 };