1 #ifndef COMPONENTS_FILES_ESCAPE_HPP
2 #define COMPONENTS_FILES_ESCAPE_HPP
8 #include <boost/iostreams/filtering_stream.hpp>
9 #include <boost/filesystem/path.hpp>
10 #include <boost/program_options.hpp>
29 template <
typename Source>
int get(Source & src);
39 template <
typename Source>
46 if (character == boost::iostreams::WOULD_BLOCK)
48 mNext.push(character);
51 else if (character == EOF)
55 mNext.push(character);
57 else if (character ==
'\n')
61 mNext.push(character);
65 mNext.push(character);
67 else if (character ==
'#')
77 mNext.push(character);
88 mNext.push(character);
95 int retval =
mNext.front();
105 template <
typename Source>
int get(Source & src);
111 template <
typename Source>
130 else if (nextChar == boost::iostreams::WOULD_BLOCK)
155 EscapeHashString(
const std::string & str,
size_t pos,
size_t len = std::string::npos);
159 template <
class InputIterator>
Definition: escape.hpp:146
escape_hash_filter()
Definition: escape.cpp:12
bool expectingIdentifier
Definition: escape.hpp:108
Definition: escape.hpp:100
unescape_hash_filter()
Definition: escape.cpp:20
static std::string processString(const std::string &str)
Definition: escape.cpp:28
int get(Source &src)
Definition: escape.hpp:112
EscapeStringVector()
Definition: escape.cpp:83
int mPrevious
Definition: escape.hpp:33
std::vector< EscapePath > EscapePathContainer
Definition: escape.hpp:192
virtual ~unescape_hash_filter()
Definition: escape.cpp:24
static const int sEscapeIdentifier
Definition: escape.hpp:24
bool mFinishLine
Definition: escape.hpp:36
bool mSeenNonWhitespace
Definition: escape.hpp:35
Definition: escape.hpp:185
friend std::ostream & operator<<(std::ostream &os, const EscapeHashString &eHS)
Definition: escape.cpp:77
static PathContainer toPathContainer(const std::vector< EscapePath > &escapePathContainer)
Definition: escape.cpp:122
virtual ~escape_hash_filter()
Definition: escape.cpp:16
std::string toStdString() const
Definition: escape.cpp:64
std::istream & operator>>(std::istream &is, EscapeHashString &eHS)
Definition: escape.cpp:69
Definition: escape.hpp:20
std::string mData
Definition: escape.hpp:149
virtual ~EscapeStringVector()
Definition: escape.cpp:87
static const int sHashIdentifier
Definition: escape.hpp:23
State & get()
Definition: state.cpp:585
static const int sEscape
Definition: escape.hpp:22
EscapeHashString()
Definition: escape.cpp:35
std::vector< std::string > toStdStringVector() const
Definition: escape.cpp:91
void validate(boost::any &v, const std::vector< std::string > &tokens, Files::EscapeHashString *eHS, int a)
Definition: escape.cpp:103
boost::filesystem::path mPath
Definition: escape.hpp:187
int get(Source &src)
Definition: escape.hpp:40
std::vector< boost::filesystem::path > PathContainer
Definition: gamesettings.hpp:14
std::queue< int > mNext
Definition: escape.hpp:32
std::vector< Files::EscapeHashString > mVector
Definition: escape.hpp:171
Definition: escape.hpp:169