11 #include <xercesc/sax2/SAX2XMLReader.hpp> 12 #include <xercesc/sax2/XMLReaderFactory.hpp> 27 if(ch == 0)
return "";
29 AnsiString astr(wstr);
32 if(ch ==
nullptr)
return "";
36 char* buf = XMLString::transcode(ch);
44 TPatternsVecsMap::const_iterator patVecIt = m_PatternsVecsMap.find(coneCrds);
45 if(patVecIt == m_PatternsVecsMap.end()){
52 return patVecIt->second;
59 return getPatternsVec(cords);
74 XStr(
const char*
const toTranscode)
77 m_fUnicodeForm = XMLString::transcode(toTranscode);
91 return m_fUnicodeForm;
104 #define Char2XMLCh(str) XStr(str).unicodeForm() 110 if(m_InstanceCount == 0) {
116 catch(
const XMLException &toCatch) {
117 throw RPCException(
"Error during Xerces-c Initialization: " 134 fin.open(fileName.c_str());
141 SAX2XMLReader*
parser = XMLReaderFactory::createXMLReader();
142 parser->setContentHandler(
this);
144 m_QualityVec.clear();
145 parser->parse(fileName.c_str());
150 const XMLCh*
const localname,
151 const XMLCh*
const qname,
152 const Attributes& attrs) {
156 if(m_CurrElement ==
"quality") {
163 unsigned long fpUL = firedPl.to_ulong();
168 m_QualityVec.push_back(quality);
170 else if(m_CurrElement ==
"pac") {
178 if(res.second ==
true)
179 m_CurPacIt = res.first;
184 else if(m_CurrElement ==
"pat") {
202 else if(m_CurrElement ==
"str") {
212 if(element ==
"pat") {
213 m_CurPacIt->second.push_back(m_CurPattern);
string xMLCh2String(const XMLCh *ch)
The coordinates of Logic Cone: m_Tower, m_LogSector, m_LogSegment.
const XMLCh * unicodeForm() const
static const TPatternType PAT_TYPE_T
unsigned char m_FiredPlanes
std::vector< RPCPattern > RPCPatVec
Container::value_type value_type
void endElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname) override
XStr(const char *const toTranscode)
const RPCPattern::RPCPatVec & getPatternsVec(const RPCConst::l1RpcConeCrdnts &coneCrds) const
static int m_InstanceCount
static const TPatternType PAT_TYPE_E
void startElement(const XMLCh *const uri, const XMLCh *const localname, const XMLCh *const qname, const XERCES_CPP_NAMESPACE::Attributes &attrs) override
~RPCPatternsParser() override
void parse(std::string fileName)
int stringToInt(std::string str)
Converts string to inteager number. If string contains chars, that are not digits, throws RPCException.