Sese Framework
2.3.0
A cross-platform framework
|
YAML parser. More...
#include <Yaml.h>
Public Member Functions | |
Yaml ()=delete | |
Public Member Functions inherited from sese::NotInstantiable | |
NotInstantiable ()=delete | |
virtual | ~NotInstantiable ()=default |
NotInstantiable (const NotInstantiable &)=delete | |
NotInstantiable & | operator= (const NotInstantiable &)=delete |
Static Public Member Functions | |
static Value | parse (io::InputStream *input) |
static bool | streamify (io::OutputStream *output, Value &value) |
Private Types | |
using | Tokens = std::vector<std::string> |
using | TokensQueue = std::queue<std::tuple<int, Tokens>> |
using | InputStream = io::InputStream |
using | OutputStream = io::OutputStream |
using | Line = std::tuple<int, std::string> |
using | ParseStack = std::stack<std::pair<Value *, int>> |
using | StreamifyStack = std::stack<std::tuple<Value *, unsigned int, unsigned int, bool>> |
using | StreamifyIterStack = std::stack<std::map<std::string, std::shared_ptr<Value>>::iterator> |
Static Private Member Functions | |
static Value | parseBasic (const std::string &value) |
static bool | parseObject (TokensQueue &tokens_queue, ParseStack &stack) |
static bool | parseArray (TokensQueue &tokens_queue, ParseStack &stack) |
static bool | streamifyObject (OutputStream *output, StreamifyStack &stack, StreamifyIterStack &map_iter_stack) |
static bool | streamifyArray (OutputStream *output, StreamifyStack &stack, StreamifyIterStack &map_iter_stack) |
static bool | streamifyBasic (OutputStream *output, const std::shared_ptr< Value > &value) |
static int | getSpaceCount (const std::string &line) noexcept |
static Line | getLine (InputStream *input) noexcept |
static Tokens | tokenizer (const std::string &line) noexcept |
static bool | writeSpace (OutputStream *output, size_t count) noexcept |
YAML parser.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
delete |
|
staticprivatenoexcept |
References count(), sese::text::AbstractStringBuffer::empty(), getSpaceCount(), and sese::text::AbstractStringBuffer::toString().
Referenced by parse().
|
staticprivatenoexcept |
Referenced by getLine().
|
static |
Deserialize yaml object from stream
input | Input stream |
References sese::Value::dict(), getLine(), sese::Value::list(), parseArray(), parseObject(), and tokenizer().
|
staticprivate |
References count(), sese::Value::dict(), sese::Value::list(), and parseBasic().
Referenced by parse().
|
staticprivate |
References d, and sese::strcmpDoNotCase().
Referenced by parseArray(), and parseObject().
|
staticprivate |
References count(), sese::Value::dict(), sese::Value::list(), and parseBasic().
Referenced by parse().
|
static |
Serialize yaml object to stream
output | Output stream |
value | yaml object |
References sese::Value::Dict::begin(), count(), sese::Value::getDict(), sese::Value::isDict(), streamifyArray(), and streamifyObject().
|
staticprivate |
References CONST_WRITE, count(), streamifyBasic(), and writeSpace().
Referenced by streamify().
|
staticprivate |
References CONST_WRITE, and STRING_WRITE.
Referenced by streamifyArray(), and streamifyObject().
|
staticprivate |
References CONST_WRITE, count(), streamifyBasic(), STRING_WRITE, and writeSpace().
Referenced by streamify().
|
staticprivatenoexcept |
References sese::text::AbstractStringBuffer::clear(), and sese::text::AbstractStringBuffer::toString().
Referenced by parse().
|
staticprivatenoexcept |
References count().
Referenced by streamifyArray(), and streamifyObject().