#include <zone_bank.h>
Public Member Functions | |
| void | addCategory (const std::string &CatType, const std::string &CatValue) |
| void | convertSize () |
| Convert size in the categories to _SizeX, _SizeY. | |
| CZoneBankElement () | |
| const std::string & | getCategory (const std::string &CatType) |
| Return the CatValue or STRING_NO_CAT_TYPE if no category of that type found. | |
| const std::vector< bool > & | getMask () |
| const std::string & | getName () |
| const std::string & | getSize () |
| uint8 | getSizeX () |
| uint8 | getSizeY () |
| void | serial (NLMISC::IStream &f) |
| void | setMask (const std::vector< bool > &mask, uint8 sizeX, uint8 sizeY) |
Private Attributes | |
| std::map< std::string, std::string > | _CategoriesMap |
| std::vector< bool > | _Mask |
| uint8 | _SizeX |
| uint8 | _SizeY |
Static Private Attributes | |
| std::string | _NoCatTypeFound = "< NOCATTYPE >" |
Friends | |
| class | CZoneBank |
|
|
Definition at line 47 of file zone_bank.cpp. References _SizeX, and _SizeY.
|
|
||||||||||||
|
Definition at line 53 of file zone_bank.cpp. References _CategoriesMap. Referenced by NLLIGO::CZoneBank::debugInit().
00054 {
00055 _CategoriesMap.insert(pair<string,string>(CatType, CatValue));
00056 }
|
|
|
Convert size in the categories to _SizeX, _SizeY.
Definition at line 81 of file zone_bank.cpp. References _SizeX, _SizeY, getSize(), and uint32. Referenced by serial().
00082 {
00083 const string &sizeString = getSize();
00084 string sTmp;
00085 uint32 i;
00086
00087 for (i = 0; i < sizeString.size(); ++i)
00088 {
00089 if (sizeString[i] == 'x')
00090 break;
00091 else
00092 sTmp += sizeString[i];
00093 }
00094 _SizeX = atoi (sTmp.c_str());
00095
00096 ++i; sTmp = "";
00097 for (; i < sizeString.size(); ++i)
00098 {
00099 sTmp += sizeString[i];
00100 }
00101 _SizeY = atoi (sTmp.c_str());
00102 }
|
|
|
Return the CatValue or STRING_NO_CAT_TYPE if no category of that type found.
Definition at line 71 of file zone_bank.cpp. References _CategoriesMap, and _NoCatTypeFound. Referenced by getName(), and getSize().
00072 {
00073 map<string,string>::iterator it = _CategoriesMap.find (CatType);
00074 if (it == _CategoriesMap.end())
00075 return _NoCatTypeFound;
00076 else
00077 return it->second;
00078 }
|
|
|
Definition at line 85 of file zone_bank.h. References _Mask.
00085 { return _Mask; }
|
|
|
Definition at line 59 of file zone_bank.cpp. References getCategory(). Referenced by NLLIGO::CZoneBank::addElement(), and NLLIGO::CZoneBank::debugInit().
00060 {
00061 return getCategory ("zone");
00062 }
|
|
|
Definition at line 65 of file zone_bank.cpp. References getCategory(). Referenced by convertSize().
00066 {
00067 return getCategory ("size");
00068 }
|
|
|
Definition at line 83 of file zone_bank.h.
00083 { return _SizeX; }
|
|
|
Definition at line 84 of file zone_bank.h.
00084 { return _SizeY; }
|
|
|
Definition at line 105 of file zone_bank.cpp. References _CategoriesMap, _Mask, convertSize(), NLMISC::IStream::serialCheck(), NLMISC::IStream::serialCont(), NLMISC::IStream::serialVersion(), sint, NLMISC::IStream::xmlPop(), and NLMISC::IStream::xmlPush(). Referenced by NLLIGO::CZoneBank::addElement(), and NLLIGO::CZoneBank::debugSaveInit().
00106 {
00107 f.xmlPush ("LIGOZONE");
00108
00109 sint version = 1;
00110 f.serialVersion (version);
00111 string check = "LIGOZONE";
00112 f.serialCheck (check);
00113
00114 f.xmlPush ("CATEGORIES");
00115 f.serialCont (_CategoriesMap);
00116 f.xmlPop ();
00117
00118 f.xmlPush ("MASK");
00119 f.serialCont (_Mask);
00120 f.xmlPop ();
00121
00122 f.xmlPop ();
00123
00124 convertSize();
00125 }
|
|
||||||||||||||||
|
Definition at line 129 of file zone_bank.cpp. References _Mask, _SizeX, _SizeY, and uint8.
|
|
|
Definition at line 94 of file zone_bank.h. |
|
|
Definition at line 63 of file zone_bank.h. Referenced by NLLIGO::CZoneBank::addAndSwitch(), addCategory(), NLLIGO::CZoneBank::addOrSwitch(), NLLIGO::CZoneBank::debugInit(), NLLIGO::CZoneBank::getCategoriesType(), getCategory(), NLLIGO::CZoneBank::getCategoryValues(), and serial(). |
|
|
Definition at line 69 of file zone_bank.h. Referenced by NLLIGO::CZoneBank::debugInit(), getMask(), serial(), and setMask(). |
|
|
Definition at line 44 of file zone_bank.cpp. Referenced by getCategory(). |
|
|
Definition at line 68 of file zone_bank.h. Referenced by convertSize(), CZoneBankElement(), getSizeX(), and setMask(). |
|
|
Definition at line 68 of file zone_bank.h. Referenced by convertSize(), CZoneBankElement(), getSizeY(), and setMask(). |
1.3.6