Merge pull request #298 from tomaz82/clean_pugi

Clean up pugixml.hpp includes
This commit is contained in:
Jools Wills 2017-11-10 21:39:56 +00:00 committed by GitHub
commit b63a2835ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 23 additions and 11 deletions

View file

@ -13,6 +13,7 @@
#include <boost/algorithm/string/predicate.hpp>
#include <boost/filesystem/operations.hpp>
#include <boost/xpressive/xpressive.hpp>
#include <pugixml/src/pugixml.hpp>
#include <fstream>
#include <unordered_map>

View file

@ -8,6 +8,7 @@
#include "Util.h"
#include <boost/filesystem/operations.hpp>
#include <boost/filesystem/path.hpp>
#include <pugixml/src/pugixml.hpp>
namespace fs = boost::filesystem;

View file

@ -3,6 +3,7 @@
#include "Log.h"
#include "Util.h"
#include <boost/date_time/posix_time/time_formatters.hpp>
#include <pugixml/src/pugixml.hpp>
namespace fs = boost::filesystem;
@ -69,7 +70,7 @@ MetaDataList::MetaDataList(MetaDataListType type)
}
MetaDataList MetaDataList::createFromXML(MetaDataListType type, pugi::xml_node node, const fs::path& relativeTo)
MetaDataList MetaDataList::createFromXML(MetaDataListType type, pugi::xml_node& node, const fs::path& relativeTo)
{
MetaDataList mdl(type);
@ -95,7 +96,7 @@ MetaDataList MetaDataList::createFromXML(MetaDataListType type, pugi::xml_node n
return mdl;
}
void MetaDataList::appendToXML(pugi::xml_node parent, bool ignoreDefaults, const fs::path& relativeTo) const
void MetaDataList::appendToXML(pugi::xml_node& parent, bool ignoreDefaults, const fs::path& relativeTo) const
{
const std::vector<MetaDataDecl>& mdd = getMDD();

View file

@ -4,7 +4,8 @@
#include <boost/date_time/posix_time/ptime.hpp>
#include <boost/filesystem/path.hpp>
#include <pugixml/src/pugixml.hpp>
namespace pugi { class xml_node; }
enum MetaDataType
{
@ -43,8 +44,8 @@ const std::vector<MetaDataDecl>& getMDDByType(MetaDataListType type);
class MetaDataList
{
public:
static MetaDataList createFromXML(MetaDataListType type, pugi::xml_node node, const boost::filesystem::path& relativeTo);
void appendToXML(pugi::xml_node parent, bool ignoreDefaults, const boost::filesystem::path& relativeTo) const;
static MetaDataList createFromXML(MetaDataListType type, pugi::xml_node& node, const boost::filesystem::path& relativeTo);
void appendToXML(pugi::xml_node& parent, bool ignoreDefaults, const boost::filesystem::path& relativeTo) const;
MetaDataList(MetaDataListType type);

View file

@ -9,6 +9,7 @@
#include "Settings.h"
#include "ThemeData.h"
#include <boost/filesystem/operations.hpp>
#include <pugixml/src/pugixml.hpp>
#include <fstream>
#ifdef WIN32
#include <Windows.h>

View file

@ -15,6 +15,7 @@
#include "SystemData.h"
#include "Util.h"
#include <boost/filesystem/operations.hpp>
#include <pugixml/src/pugixml.hpp>
#include <unordered_map>
#define FADE_TIME 300

View file

@ -6,6 +6,7 @@
#include "Settings.h"
#include "SystemData.h"
#include "Util.h"
#include <pugixml/src/pugixml.hpp>
using namespace PlatformIds;
const std::map<PlatformId, const char*> gamesdb_platformid_map {

View file

@ -1,6 +1,7 @@
#include "InputConfig.h"
#include "Log.h"
#include <pugixml/src/pugixml.hpp>
//some util functions
std::string inputTypeToString(InputType type)
@ -146,7 +147,7 @@ std::vector<std::string> InputConfig::getMappedTo(Input input)
return maps;
}
void InputConfig::loadFromXML(pugi::xml_node node)
void InputConfig::loadFromXML(pugi::xml_node& node)
{
clear();
@ -172,7 +173,7 @@ void InputConfig::loadFromXML(pugi::xml_node node)
}
}
void InputConfig::writeToXML(pugi::xml_node parent)
void InputConfig::writeToXML(pugi::xml_node& parent)
{
pugi::xml_node cfg = parent.append_child("inputConfig");

View file

@ -5,13 +5,14 @@
#ifdef HAVE_LIBCEC
#include <libcec/cectypes.h>
#endif // HAVE_LIBCEC
#include <pugixml/src/pugixml.hpp>
#include <SDL_joystick.h>
#include <SDL_keyboard.h>
#include <map>
#include <sstream>
#include <vector>
namespace pugi { class xml_node; }
#define DEVICE_KEYBOARD -1
#define DEVICE_CEC -2
@ -212,8 +213,8 @@ public:
// Writes Input mapped to this name to result if true.
bool getInputByName(const std::string& name, Input* result);
void loadFromXML(pugi::xml_node root);
void writeToXML(pugi::xml_node parent);
void loadFromXML(pugi::xml_node& root);
void writeToXML(pugi::xml_node& parent);
bool isConfigured();

View file

@ -5,6 +5,7 @@
#include "platform.h"
#include "Window.h"
#include <boost/filesystem/operations.hpp>
#include <pugixml/src/pugixml.hpp>
#include <SDL.h>
#include <iostream>

View file

@ -7,6 +7,7 @@
#include "Settings.h"
#include <boost/filesystem/operations.hpp>
#include <boost/xpressive/xpressive_static.hpp>
#include <pugixml/src/pugixml.hpp>
std::vector<std::string> ThemeData::sSupportedViews { { "system" }, { "basic" }, { "detailed" }, { "video" } };
std::vector<std::string> ThemeData::sSupportedFeatures { { "video" }, { "carousel" }, { "z-index" } };

View file

@ -6,11 +6,12 @@
#include <boost/filesystem/path.hpp>
#include <boost/variant/get.hpp>
#include <boost/variant/variant.hpp>
#include <pugixml/src/pugixml.hpp>
#include <deque>
#include <map>
#include <sstream>
namespace pugi { class xml_node; }
template<typename T>
class TextListComponent;