11 #include <xercesc/sax2/SAX2XMLReader.hpp> 12 #include <xercesc/sax2/XMLReaderFactory.hpp> 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) {
122 SAX2XMLReader*
parser = XMLReaderFactory::createXMLReader();
123 parser->setContentHandler(
this);
125 m_QualityVec.clear();
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();
144 quality.m_FiredPlanes = (
unsigned char)(fpUL & 0xFF);
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)
const XMLCh * unicodeForm() const
The coordinates of Logic Cone: m_Tower, m_LogSector, m_LogSegment.
const RPCPattern::RPCPatVec & getPatternsVec(const RPCConst::l1RpcConeCrdnts &coneCrds) const
static const TPatternType PAT_TYPE_T
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)
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.