|
Ginga
0.13.6.1771-df200
The iTV middleware.
|
#include "aux-ginga.h"#include "ParserLibXML.h"#include "Ncl.h"#include <libxml/tree.h>#include <libxml/parser.h>
Classes | |
| struct | ParserLibXML_State |
| struct | NclAttrInfo |
| struct | NclEltInfo |
Macros | |
| #define | toCString(s) deconst (char *, (s)) |
| #define | toXmlChar(s) (xmlChar *)(deconst (char *, (s).c_str ())) |
| #define | toString(s) string (deconst (char *, (s))) |
| #define | ST_ERR(st, fmt, ...) (_st_err ((st), fmt, ## __VA_ARGS__), false) |
| #define | ST_ERR_LINE(st, line, fmt, ...) ST_ERR ((st), "Syntax error at line %d: " fmt, (line), ## __VA_ARGS__) |
| #define | ST_ERR_ELT(st, elt, fmt, ...) |
| #define | ST_ERR_ELT_UNKNOWN(st, elt) ST_ERR_ELT ((st), (elt), "Unknown element") |
| #define | ST_ERR_ELT_MISSING_PARENT(st, elt) ST_ERR_ELT ((st), (elt), "Missing parent") |
| #define | ST_ERR_ELT_BAD_PARENT(st, elt, parent) ST_ERR_ELT ((st), (elt), "Bad parent <%s>", (parent)) |
| #define | ST_ERR_ELT_UNKNOWN_ATTR(st, elt, attr) ST_ERR_ELT ((st), (elt), "Unknown attribute '%s'", (attr)) |
| #define | ST_ERR_ELT_MISSING_ATTR(st, elt, attr) ST_ERR_ELT ((st), (elt), "Missing attribute '%s'", (attr)) |
| #define | ST_ERR_ELT_BAD_ATTR(st, elt, attr, val, explain) |
| #define | ST_ERR_ELT_UNKNOWN_CHILD(st, elt, child) ST_ERR_ELT ((st), (elt), "Unknown child <%s>", (child)) |
| #define | NCL_ELT_PUSH_DECL(elt) |
| #define | NCL_ELT_POP_DECL(elt) |
| #define | _NCL_ATTR_PARSE(Type, tab, str, result) |
| #define | FLAGS (XML_PARSE_NOERROR | XML_PARSE_NOWARNING) |
Typedefs | |
| typedef map< string, map< string, string > > | ParserLibXML_Cache |
| typedef struct ParserLibXML_State | ParserLibXML_State |
| typedef bool( | NclEltPushFunc) (ParserLibXML_State *, xmlNode *, map< string, string > *, NclEntity **) |
| typedef bool( | NclEltPopFunc) (ParserLibXML_State *, xmlNode *, map< string, string > *, vector< xmlNode * > *, NclEntity *) |
| typedef struct NclAttrInfo | NclAttrInfo |
| typedef struct NclEltInfo | NclEltInfo |
Enumerations | |
| enum | NclEltFlag { NCL_ELT_FLAG_CACHE = 1<<0, NCL_ELT_FLAG_GEN_ID = 2<<0 } |
Functions | |
| static bool | xmlGetPropAsString (xmlNode *node, const string &name, string *result) |
| static | G_GNUC_PRINTF (2, 3) void _st_err(ParserLibXML_State *st |
| va_start (args, fmt) | |
| va_end (args) | |
| g_assert (n >=0) | |
| g_assert_nonnull (c_str) | |
| st errmsg | assign (c_str) |
| g_free (c_str) | |
| static bool | st_cache_index (ParserLibXML_State *st, const string &key, map< string, string > **result) |
| static void * | st_get_data (ParserLibXML_State *st, const string &key) |
| static void | st_set_data (ParserLibXML_State *st, const string &key, void *value) |
| static string | st_gen_id (ParserLibXML_State *st) |
| static bool | st_resolve_idref (ParserLibXML_State *st, const string &id, set< string > tags, xmlNode **result_elt, map< string, string > **result_cache) |
| static bool | ncl_eltmap_index (const string &tag, NclEltInfo **result) |
| static map< string, bool > | ncl_eltmap_get_possible_children (const string &tag) |
| static bool | ncl_attr_parse_eventType (string str, Event::Type *result) |
| static bool | ncl_attr_parse_transition (string str, Event::Transition *result) |
| static bool | ncl_attr_parse_actionType (string str, Event::Transition *result) |
| static bool | ncl_attrmap_index (map< string, string > *attr, const string &name, string *result) |
| static string | ncl_attrmap_get (map< string, string > *attr, const string &name) |
| static string | ncl_attrmap_opt_get (map< string, string > *attr, const string &name, const string &defvalue) |
| static bool | ncl_push_ncl (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | ncl_pop_ncl (unused(ParserLibXML_State *st), unused(xmlNode *elt), unused(map< string, string > *attr), unused(vector< xmlNode * > *children), unused(NclEntity *entity)) |
| static bool | ncl_push_context (ParserLibXML_State *st, xmlNode *elt, map< string, string > *attr, NclEntity **entity) |
| static bool | ncl_pop_context (unused(ParserLibXML_State *st), unused(xmlNode *elt), unused(map< string, string > *attr), unused(vector< xmlNode * > *children), unused(NclEntity *entity)) |
| static bool | ncl_push_port (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | ncl_push_media (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | ncl_push_property (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | ncl_push_link (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, NclEntity **entity) |
| static bool | ncl_push_region (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | ncl_pop_region (ParserLibXML_State *st, unused(xmlNode *elt), unused(map< string, string > *attr), unused(vector< xmlNode * > *children), unused(NclEntity *entity)) |
| static bool | ncl_push_descriptorParam (ParserLibXML_State *st, xmlNode *elt, map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | ncl_push_causalConnector (ParserLibXML_State *st, unused(xmlNode *elt), map< string, string > *attr, NclEntity **entity) |
| static bool | ncl_pop_causalConnector (ParserLibXML_State *st, xmlNode *elt, unused(map< string, string > *attr), unused(vector< xmlNode * > *children), NclEntity *entity) |
| static bool | ncl_push_simpleConditionOrAction (ParserLibXML_State *st, xmlNode *elt, map< string, string > *attr, unused(NclEntity **entity)) |
| static bool | processElt (ParserLibXML_State *st, xmlNode *elt) |
| static NclDocument * | processDoc (xmlDoc *doc, int width, int height, string *errmsg) |
Variables | |
| static const char * | fmt |
| static const char char * | c_str = nullptr |
| int | n = g_vasprintf (&c_str, fmt, args) |
| static map< string, NclEltInfo > | ncl_eltmap |
| #define _NCL_ATTR_PARSE | ( | Type, | |
| tab, | |||
| str, | |||
| result | |||
| ) |
Referenced by ncl_attr_parse_actionType(), ncl_attr_parse_eventType(), and ncl_attr_parse_transition().
| #define FLAGS (XML_PARSE_NOERROR | XML_PARSE_NOWARNING) |
Referenced by ParserLibXML::parseBuffer(), and ParserLibXML::parseFile().
| #define NCL_ELT_POP_DECL | ( | elt | ) |
| #define NCL_ELT_PUSH_DECL | ( | elt | ) |
| #define ST_ERR_ELT_BAD_ATTR | ( | st, | |
| elt, | |||
| attr, | |||
| val, | |||
| explain | |||
| ) |
Referenced by ncl_pop_context(), ncl_pop_ncl(), ncl_push_simpleConditionOrAction(), and processElt().
| #define ST_ERR_ELT_BAD_PARENT | ( | st, | |
| elt, | |||
| parent | |||
| ) | ST_ERR_ELT ((st), (elt), "Bad parent <%s>", (parent)) |
Referenced by processElt().
| #define ST_ERR_ELT_MISSING_ATTR | ( | st, | |
| elt, | |||
| attr | |||
| ) | ST_ERR_ELT ((st), (elt), "Missing attribute '%s'", (attr)) |
Referenced by ncl_push_simpleConditionOrAction(), and processElt().
| #define ST_ERR_ELT_MISSING_PARENT | ( | st, | |
| elt | |||
| ) | ST_ERR_ELT ((st), (elt), "Missing parent") |
Referenced by processElt().
| #define ST_ERR_ELT_UNKNOWN | ( | st, | |
| elt | |||
| ) | ST_ERR_ELT ((st), (elt), "Unknown element") |
Referenced by processElt().
| #define ST_ERR_ELT_UNKNOWN_ATTR | ( | st, | |
| elt, | |||
| attr | |||
| ) | ST_ERR_ELT ((st), (elt), "Unknown attribute '%s'", (attr)) |
Referenced by processElt().
| #define ST_ERR_ELT_UNKNOWN_CHILD | ( | st, | |
| elt, | |||
| child | |||
| ) | ST_ERR_ELT ((st), (elt), "Unknown child <%s>", (child)) |
Referenced by processElt().
| #define ST_ERR_LINE | ( | st, | |
| line, | |||
| fmt, | |||
| ... | |||
| ) | ST_ERR ((st), "Syntax error at line %d: " fmt, (line), ## __VA_ARGS__) |
| #define toCString | ( | s | ) | deconst (char *, (s)) |
Referenced by processElt().
| #define toString | ( | s | ) | string (deconst (char *, (s))) |
Referenced by xmlGetPropAsString().
| typedef struct NclAttrInfo NclAttrInfo |
| typedef struct NclEltInfo NclEltInfo |
| typedef bool( NclEltPopFunc) (ParserLibXML_State *, xmlNode *, map< string, string > *, vector< xmlNode * > *, NclEntity *) |
| typedef bool( NclEltPushFunc) (ParserLibXML_State *, xmlNode *, map< string, string > *, NclEntity **) |
| typedef map<string, map<string, string> > ParserLibXML_Cache |
| typedef struct ParserLibXML_State ParserLibXML_State |
| enum NclEltFlag |
| st errmsg assign | ( | c_str | ) |
| g_assert | ( | n >= | 0 | ) |
Referenced by __ginga_strfunc(), Context::addLink(), Document::addObject(), GL::clear_scene(), Player::doSetProperty(), GL::draw_quad(), Switch::endTransition(), Media::endTransition(), ParserState::errElt(), ParserState::errEltMissingChild(), Player::getPlayerProperty(), NclDocument::getSettingsNodes(), Predicate::getTest(), AnimInfo::init(), NclMediaRefer::initReferred(), ncl_attrmap_get(), ncl_pop_context(), ncl_pop_ncl(), ncl_push_descriptorParam(), NclEntity::NclEntity(), Formatter::obtainEvent(), Formatter::obtainExecutionObject(), PlayerVideo::pause(), PlayerLua::pause(), Player::pause(), PlayerHTML::PlayerHTML(), PlayerVideo::PlayerVideo(), ParserState::popAssessmentStatement(), ParserState::popCompoundStatement(), ParserState::popContext(), ParserState::popMedia(), ParserState::popNcl(), ParserState::popRegion(), ParserXercesC::posCompileContext(), ParserXercesC::posCompileSwitch(), process(), ParserState::processNode(), ParserState::pushArea(), ParserState::pushAttributeAssessment(), ParserState::pushBind(), ParserState::pushCompoundStatement(), ParserState::pushContext(), ParserState::pushDescriptorParam(), ParserState::pushLinkParam(), ParserState::pushMedia(), ParserState::pushPort(), ParserState::pushProperty(), ParserState::pushSimpleCondition(), PlayerVideo::redraw(), PlayerLua::redraw(), Player::redraw(), PlayerSvg::reload(), Formatter::resize(), ParserState::resolveComponentRef(), ParserState::resolveGhostBindRef(), ParserState::resolveInterfaceRef(), PlayerVideo::resume(), PlayerLua::resume(), Player::resume(), Object::sendTickEvent(), Formatter::setOptionBackground(), Formatter::setOptionDebug(), Formatter::setOptionExperimental(), Formatter::setOptionOpenGL(), Formatter::setOptionSize(), Media::setProperty(), Object::setProperty(), Predicate::setTest(), st_resolve_idref(), PlayerVideo::start(), PlayerLua::start(), Formatter::start(), Player::start(), Switch::startTransition(), Media::startTransition(), Context::startTransition(), PlayerVideo::stop(), PlayerLua::stop(), Player::stop(), AnimInfo::update(), PlayerAnimator::update(), GL::update_texture(), xstrassign(), xstrbuild(), and xstrtod().
| g_assert_nonnull | ( | c_str | ) |
Referenced by NclNode::addAnchor(), NclLink::addBind(), Composition::addChild(), Predicate::addChild(), NclContext::addLink(), NclSwitch::addNode(), NclComposition::addNode(), Document::addObject(), NclComposition::addPort(), Context::addPort(), Switch::addRule(), NclMedia::addSameInstance(), cairox_surface_create_from_file(), PlayerVideo::cb_Bus(), PlayerVideo::cb_NewSample(), cmpz(), NclLink::contains(), Player::createPlayer(), NclNode::derefer(), ParserState::eltCacheIndex(), ParserState::eltCacheIndexByTag(), Media::endTransition(), ParserState::errElt(), Document::evalAction(), Event::Event(), Event::getFullId(), NclNode::getLambda(), Object::getLambda(), NclComposition::getMapInterface(), Document::getRoot(), Document::getSettings(), NclDocument::getSettingsNodes(), NclPort::getTarget(), Media::getZ(), Object::initDocument(), NclPort::initInterface(), NclPort::initNode(), NclNode::initParent(), NclPort::initParent(), Object::initParent(), Predicate::initParent(), NclMediaRefer::initReferred(), Media::isFocused(), Object::isOccurring(), Object::isPaused(), Object::isSleeping(), ncl_pop_causalConnector(), ncl_pop_context(), ncl_pop_ncl(), ncl_pop_region(), ncl_push_context(), ncl_push_link(), ncl_push_media(), ncl_push_port(), ncl_push_property(), ncl_push_region(), ncl_push_simpleConditionOrAction(), Object::Object(), ParserState::objStackPush(), Formatter::obtainEvent(), Formatter::obtainExecutionObject(), Formatter::obtainFormatterEventFromBind(), Formatter::obtainFormatterLink(), ParserXercesC::parse0(), ParserXercesC::parseAssessmentStatement(), ParserXercesC::parseBind(), ParserXercesC::parseBody(), Parser::parseBuffer(), ParserLibXML::parseBuffer(), ParserXercesC::parseCompoundCondition(), ParserXercesC::parseCompoundStatement(), ParserXercesC::parseContext(), Parser::parseFile(), ParserLibXML::parseFile(), ParserXercesC::parseImportBase(), ParserXercesC::parseMedia(), ParserXercesC::parseNcl(), ParserElt::ParserElt(), ParserXercesC::parseSwitch(), Player::Player(), PlayerAnimator::PlayerAnimator(), PlayerVideo::PlayerVideo(), ParserState::popContext(), ParserState::popNcl(), ParserState::popRegion(), ParserXercesC::posCompileContext(), ParserXercesC::posCompileSwitch(), ParserState::process(), processDoc(), processElt(), ParserState::processNode(), ParserState::pushArea(), ParserState::pushContext(), ParserState::pushLink(), ParserState::pushMedia(), ParserState::pushNcl(), ParserState::pushProperty(), ParserState::pushRegion(), ParserState::pushSimpleCondition(), PlayerLua::pwdSave(), PlayerVideo::redraw(), PlayerLua::redraw(), Player::redrawDebuggingInfo(), PlayerImage::reload(), PlayerSvg::reload(), PlayerText::reload(), PlayerText::renderSurface(), ParserState::resolveInterfaceRef(), Media::sendKeyEvent(), PlayerLua::sendKeyEvent(), Media::sendTickEvent(), ParserXercesC::solveNodeReferences(), PlayerVideo::start(), Formatter::start(), Switch::startTransition(), Context::startTransition(), PlayerLua::stop(), PlayerAnimator::update(), MediaSettings::updateCurrentFocus(), xstrassign(), and xstrbuild().
| g_free | ( | c_str | ) |
|
inlinestatic |
|
static |
References _NCL_ATTR_PARSE, Event::ABORT, Event::PAUSE, Event::RESUME, Event::START, and Event::STOP.
Referenced by ncl_push_simpleConditionOrAction().
|
static |
References _NCL_ATTR_PARSE, Event::ATTRIBUTION, Event::PRESENTATION, and Event::SELECTION.
Referenced by ncl_push_simpleConditionOrAction().
|
static |
References _NCL_ATTR_PARSE, Event::ABORT, Event::PAUSE, Event::RESUME, Event::START, and Event::STOP.
Referenced by ncl_push_simpleConditionOrAction().
|
inlinestatic |
References g_assert(), and ncl_attrmap_index().
Referenced by ncl_pop_context(), ncl_pop_ncl(), ncl_push_causalConnector(), ncl_push_descriptorParam(), ncl_push_link(), ncl_push_media(), ncl_push_port(), ncl_push_property(), ncl_push_simpleConditionOrAction(), and processElt().
|
inlinestatic |
References tryset.
Referenced by ncl_attrmap_get(), ncl_attrmap_opt_get(), ncl_pop_context(), ncl_pop_ncl(), ncl_push_media(), ncl_push_region(), ncl_push_simpleConditionOrAction(), and processElt().
|
inlinestatic |
References ncl_attrmap_index().
Referenced by ncl_push_context(), ncl_push_ncl(), ncl_push_property(), and ncl_push_simpleConditionOrAction().
|
static |
References ncl_eltmap.
Referenced by processElt().
|
static |
References ncl_eltmap, and tryset.
Referenced by processElt().
|
static |
References cast, and g_assert_nonnull().
|
static |
References ParserLibXML_State::cacheelt, ParserLibXML_State::cacheset, cast, g_assert(), g_assert_nonnull(), NclDocument::getEntityById(), NclNode::hasProperty(), ParserLibXML_State::ncl, ncl_attrmap_get(), ncl_attrmap_index(), NclNode::setProperty(), st_cache_index(), ST_ERR_ELT_BAD_ATTR, st_resolve_idref(), and unlikely.
|
static |
References g_assert_nonnull(), ParserLibXML_State::rect, st_get_data(), and toString.
|
static |
References ParserLibXML_State::ncl, and ncl_attrmap_get().
|
static |
|
static |
References g_assert(), ncl_attrmap_get(), st_cache_index(), and xmlGetPropAsString().
|
static |
|
static |
|
static |
References ParserLibXML_State::doc, ParserLibXML_State::ncl, ncl_attrmap_opt_get(), and toString.
|
static |
|
static |
|
static |
References g_assert_nonnull(), ncl_attrmap_index(), ParserLibXML_State::rect, st_get_data(), st_set_data(), toString, and xstrbuild().
|
static |
|
static |
|
static |
References NclEltInfo::attributes, ParserLibXML_State::cache, ParserLibXML_State::cacheelt, ParserLibXML_State::cacheset, NclEltInfo::flags, g_assert_nonnull(), NclDocument::getEntityById(), ParserLibXML_State::ncl, ncl_attrmap_get(), ncl_attrmap_index(), NCL_ELT_FLAG_CACHE, NCL_ELT_FLAG_GEN_ID, ncl_eltmap_get_possible_children(), ncl_eltmap_index(), NclEltInfo::parents, NclEltInfo::pop, NclEltInfo::push, ST_ERR_ELT_BAD_ATTR, ST_ERR_ELT_BAD_PARENT, ST_ERR_ELT_MISSING_ATTR, ST_ERR_ELT_MISSING_PARENT, ST_ERR_ELT_UNKNOWN, ST_ERR_ELT_UNKNOWN_ATTR, ST_ERR_ELT_UNKNOWN_CHILD, st_gen_id(), ParserLibXML_State::stack, toCString, toString, unlikely, xmlGetPropAsString(), and xstrbuild().
Referenced by processDoc().
|
static |
References ParserLibXML_State::cache, and tryset.
Referenced by ncl_pop_context(), ncl_pop_ncl(), ncl_push_descriptorParam(), and st_resolve_idref().
|
static |
References ParserLibXML_State::genid, and xstrbuild().
Referenced by processElt().
|
static |
References ParserLibXML_State::userdata.
Referenced by ncl_pop_region(), and ncl_push_region().
|
static |
References ParserLibXML_State::cacheelt, g_assert(), st_cache_index(), toString, and tryset.
Referenced by ncl_pop_context(), and ncl_pop_ncl().
|
static |
References ParserLibXML_State::userdata.
Referenced by ncl_push_region().
| va_end | ( | args | ) |
Referenced by xstrassign(), and xstrbuild().
| va_start | ( | args | , |
| fmt | |||
| ) |
Referenced by xstrassign(), and xstrbuild().
|
inlinestatic |
References g_free(), toString, toXmlChar, and tryset.
Referenced by ncl_push_descriptorParam(), and processElt().
| const char char* c_str = nullptr |
Referenced by _xstrtod(), _xstrtoll(), _xstrtoull(), Player::redrawDebuggingInfo(), Object::toString(), xstrassign(), and xstrbuild().
| const char* fmt |
Referenced by Document::evalAction(), Formatter::setOptionOpenGL(), try_parse_list(), xstrassign(), and xstrbuild().
|
static |
Referenced by ncl_eltmap_get_possible_children(), and ncl_eltmap_index().