4 * Copyright (C) 2005-2013 Team XBMC
7 * This Program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * This Program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with XBMC; see the file COPYING. If not, see
19 * <http://www.gnu.org/licenses/>.
23 #include "utils/StdString.h"
27 #include "interfaces/info/InfoBool.h"
29 // forward definitions
33 class CSkinVariableString;
43 bool LoadIncludes(const CStdString &includeFile);
44 bool LoadIncludesFromXML(const TiXmlElement *root);
46 /*! \brief Resolve <include>name</include> tags recursively for the given XML element
47 Replaces any instances of <include file="foo">bar</include> with the value of the include
48 "bar" from the include file "foo".
49 \param node an XML Element - all child elements are traversed.
51 void ResolveIncludes(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL);
52 const INFO::CSkinVariableString* CreateSkinVariable(const CStdString& name, int context);
55 void ResolveIncludesForNode(TiXmlElement *node, std::map<INFO::InfoPtr, bool>* xmlIncludeConditions = NULL);
56 CStdString ResolveConstant(const CStdString &constant) const;
57 bool HasIncludeFile(const CStdString &includeFile) const;
58 std::map<CStdString, TiXmlElement> m_includes;
59 std::map<CStdString, TiXmlElement> m_defaults;
60 std::map<CStdString, TiXmlElement> m_skinvariables;
61 std::map<CStdString, CStdString> m_constants;
62 std::vector<CStdString> m_files;
63 typedef std::vector<CStdString>::const_iterator iFiles;
65 std::set<std::string> m_constantAttributes;
66 std::set<std::string> m_constantNodes;