11 #include <xercesc/sax2/SAX2XMLReader.hpp>
12 #include <xercesc/sax2/XMLReaderFactory.hpp>
22 using namespace xercesc;
30 AnsiString astr(wstr);
38 char*
buf = XMLString::transcode(ch);
46 TPatternsVecsMap::const_iterator patVecIt = m_PatternsVecsMap.find(coneCrds);
47 if (patVecIt == m_PatternsVecsMap.end()) {
53 return patVecIt->second;
59 return getPatternsVec(cords);
71 XStr(
const char*
const toTranscode) {
73 m_fUnicodeForm = XMLString::transcode(toTranscode);
93 #define Char2XMLCh(str) XStr(str).unicodeForm()
98 if (m_InstanceCount == 0) {
103 }
catch (
const XMLException& toCatch) {
115 fin.open(fileName.c_str());
122 SAX2XMLReader*
parser = XMLReaderFactory::createXMLReader();
123 parser->setContentHandler(
this);
125 m_QualityVec.clear();
126 parser->parse(fileName.c_str());
131 const XMLCh*
const localname,
132 const XMLCh*
const qname,
133 const Attributes& attrs) {
137 if (m_CurrElement ==
"quality") {
143 unsigned long fpUL = firedPl.to_ulong();
148 m_QualityVec.push_back(quality);
149 }
else if (m_CurrElement ==
"pac") {
155 pair<TPatternsVecsMap::iterator, bool> res =
157 if (res.second ==
true)
158 m_CurPacIt = res.first;
162 }
else if (m_CurrElement ==
"pat") {
179 }
else if (m_CurrElement ==
"str") {
189 if (element ==
"pat") {
190 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
uint32_t const *__restrict__ Quality * quality
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.