27 std::vector<std::pair<size_t, std::string>>& aVec,
28 const std::string& aText )
30 if( aMap.count( aText ) )
32 return aMap.at( aText );
36 auto index = aMap.size();
37 aMap.emplace( aText, index );
38 aVec.emplace_back( index, aText );
68 if( attr.second.size() )
69 ost <<
"=" << attr.second;
80 ost << prefix <<
"@" << n <<
" " <<
name << std::endl;
89 ost << prefix <<
"&" << n <<
" " <<
name << std::endl;
96 ost << std::endl <<
"#\n#Feature attribute names\n#" << std::endl;
99 ost << std::endl <<
"#\n#Feature attribute text strings\n#" << std::endl;
void WriteAttributesText(std::ostream &ost, const std::string &prefix="") const
std::vector< std::pair< size_t, std::string > > m_attrTextVec
std::vector< std::pair< size_t, std::string > > m_attrNameVec
size_t GetTextIndex(std::unordered_map< std::string, size_t > &aMap, std::vector< std::pair< size_t, std::string > > &aVec, const std::string &aText)
void WriteAttributes(std::ostream &ost, const std::string &prefix="") const
size_t GetAttrTextNumber(const wxString &aName)
std::unordered_map< std::string, size_t > m_attrNames
size_t GetAttrNameNumber(const wxString &name)
void WriteAttributesName(std::ostream &ost, const std::string &prefix="") const
std::unordered_map< std::string, size_t > m_attrTexts
std::map< unsigned int, std::string > attributes
void WriteAttributes(std::ostream &ost) const