Merge from core, and update several missing DLL exports. This does not resolve them all (in particular, node_data::equals seems to be still missing, even though it is inlined in a header, which seems strange).

This commit is contained in:
Jesse Beder
2014-03-24 00:31:43 -05:00
9 changed files with 38 additions and 23 deletions

View File

@@ -10,11 +10,13 @@
#include <string> #include <string>
#include <vector> #include <vector>
namespace YAML { #include "yaml-cpp/dll.h"
std::string EncodeBase64(const unsigned char *data, std::size_t size);
std::vector<unsigned char> DecodeBase64(const std::string &input);
class Binary { namespace YAML {
YAML_CPP_API std::string EncodeBase64(const unsigned char *data, std::size_t size);
YAML_CPP_API std::vector<unsigned char> DecodeBase64(const std::string &input);
class YAML_CPP_API Binary {
public: public:
Binary() : m_unownedData(0), m_unownedSize(0) {} Binary() : m_unownedData(0), m_unownedSize(0) {}
Binary(const unsigned char *data_, std::size_t size_) Binary(const unsigned char *data_, std::size_t size_)

View File

@@ -144,7 +144,7 @@ template <>
struct convert<bool> { struct convert<bool> {
static Node encode(bool rhs) { return rhs ? Node("true") : Node("false"); } static Node encode(bool rhs) { return rhs ? Node("true") : Node("false"); }
static bool decode(const Node& node, bool& rhs); YAML_CPP_API static bool decode(const Node& node, bool& rhs);
}; };
// std::map // std::map

View File

@@ -11,6 +11,7 @@
#include <boost/smart_ptr/shared_ptr.hpp> #include <boost/smart_ptr/shared_ptr.hpp>
#include <set> #include <set>
#include "yaml-cpp/dll.h"
#include "yaml-cpp/node/ptr.h" #include "yaml-cpp/node/ptr.h"
namespace YAML { namespace YAML {
@@ -21,7 +22,7 @@ class node;
namespace YAML { namespace YAML {
namespace detail { namespace detail {
class memory { class YAML_CPP_API memory {
public: public:
node& create_node(); node& create_node();
void merge(const memory& rhs); void merge(const memory& rhs);
@@ -31,7 +32,7 @@ class memory {
Nodes m_nodes; Nodes m_nodes;
}; };
class memory_holder { class YAML_CPP_API memory_holder {
public: public:
memory_holder() : m_pMemory(new memory) {} memory_holder() : m_pMemory(new memory) {}

View File

@@ -29,7 +29,7 @@ class node;
namespace YAML { namespace YAML {
namespace detail { namespace detail {
class node_data : private boost::noncopyable { class YAML_CPP_API node_data : private boost::noncopyable {
public: public:
node_data(); node_data();

View File

@@ -10,14 +10,16 @@
#include <string> #include <string>
#include <iosfwd> #include <iosfwd>
#include "yaml-cpp/dll.h"
namespace YAML { namespace YAML {
class Emitter; class Emitter;
class Node; class Node;
Emitter& operator<<(Emitter& out, const Node& node); YAML_CPP_API Emitter& operator<<(Emitter& out, const Node& node);
std::ostream& operator<<(std::ostream& out, const Node& node); YAML_CPP_API std::ostream& operator<<(std::ostream& out, const Node& node);
std::string Dump(const Node& node); YAML_CPP_API std::string Dump(const Node& node);
} }
#endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #endif // NODE_EMIT_H_62B23520_7C8E_11DE_8A39_0800200C9A66

View File

@@ -24,7 +24,7 @@ struct iterator_value;
} // namespace YAML } // namespace YAML
namespace YAML { namespace YAML {
class Node { class YAML_CPP_API Node {
public: public:
friend class NodeBuilder; friend class NodeBuilder;
friend class NodeEvents; friend class NodeEvents;
@@ -126,9 +126,9 @@ class Node {
mutable detail::node* m_pNode; mutable detail::node* m_pNode;
}; };
bool operator==(const Node& lhs, const Node& rhs); YAML_CPP_API bool operator==(const Node& lhs, const Node& rhs);
Node Clone(const Node& node); YAML_CPP_API Node Clone(const Node& node);
template <typename T> template <typename T>
struct convert; struct convert;

View File

@@ -11,18 +11,20 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "yaml-cpp/dll.h"
namespace YAML { namespace YAML {
class Node; class Node;
Node Load(const std::string& input); YAML_CPP_API Node Load(const std::string& input);
Node Load(const char* input); YAML_CPP_API Node Load(const char* input);
Node Load(std::istream& input); YAML_CPP_API Node Load(std::istream& input);
Node LoadFile(const std::string& filename); YAML_CPP_API Node LoadFile(const std::string& filename);
std::vector<Node> LoadAll(const std::string& input); YAML_CPP_API std::vector<Node> LoadAll(const std::string& input);
std::vector<Node> LoadAll(const char* input); YAML_CPP_API std::vector<Node> LoadAll(const char* input);
std::vector<Node> LoadAll(std::istream& input); YAML_CPP_API std::vector<Node> LoadAll(std::istream& input);
std::vector<Node> LoadAllFromFile(const std::string& filename); YAML_CPP_API std::vector<Node> LoadAllFromFile(const std::string& filename);
} }
#endif // VALUE_PARSE_H_62B23520_7C8E_11DE_8A39_0800200C9A66 #endif // VALUE_PARSE_H_62B23520_7C8E_11DE_8A39_0800200C9A66

View File

@@ -10,8 +10,10 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include "yaml-cpp/dll.h"
namespace YAML { namespace YAML {
class ostream_wrapper { class YAML_CPP_API ostream_wrapper {
public: public:
ostream_wrapper(); ostream_wrapper();
explicit ostream_wrapper(std::ostream& stream); explicit ostream_wrapper(std::ostream& stream);

View File

@@ -1,7 +1,13 @@
set(gtest_force_shared_crt ${MSVC_SHARED_RT} CACHE BOOL
"Use shared (DLL) run-time lib even when Google Test built as a static lib.")
add_subdirectory(gmock-1.7.0) add_subdirectory(gmock-1.7.0)
include_directories(gmock-1.7.0/gtest/include) include_directories(gmock-1.7.0/gtest/include)
include_directories(gmock-1.7.0/include) include_directories(gmock-1.7.0/include)
if(WIN32 AND BUILD_SHARED_LIBS)
add_definitions("-DGTEST_LINKED_AS_SHARED_LIBRARY")
endif()
file(GLOB test_headers [a-z_]*.h) file(GLOB test_headers [a-z_]*.h)
file(GLOB test_sources [a-z_]*.cpp integration/[a-z_]*.cpp node/[a-z_]*.cpp) file(GLOB test_sources [a-z_]*.cpp integration/[a-z_]*.cpp node/[a-z_]*.cpp)
file(GLOB test_new_api_sources new-api/[a-z]*.cpp) file(GLOB test_new_api_sources new-api/[a-z]*.cpp)