Skip to content

Commit de55b83

Browse files
fanc999-1kjellahl
authored andcommitted
libxml++ headers: Mark classes and functions with LIBXMLPP_API
This prepares us to export and symbols on Visual Studio builds using only compiler directives, and to drop the venerable gendef.cc
1 parent 4414a22 commit de55b83

39 files changed

+55
-48
lines changed

libxml++/attribute.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace xmlpp
1818
/** Represents an XML attribute node or attribute declaration.
1919
* This will be instantiated by the parser.
2020
*/
21-
class Attribute : public Node
21+
class LIBXMLPP_API Attribute : public Node
2222
{
2323
public:
2424
explicit Attribute(_xmlNode* node);

libxml++/attributedeclaration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ namespace xmlpp
2525
*
2626
* @newin{2,36}
2727
*/
28-
class AttributeDeclaration : public Attribute
28+
class LIBXMLPP_API AttributeDeclaration : public Attribute
2929
{
3030
public:
3131
explicit AttributeDeclaration(_xmlNode* node);

libxml++/attributenode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace xmlpp
2626
*
2727
* @newin{2,36}
2828
*/
29-
class AttributeNode : public Attribute
29+
class LIBXMLPP_API AttributeNode : public Attribute
3030
{
3131
public:
3232
explicit AttributeNode(_xmlNode* node);

libxml++/document.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ enum class XmlEntityType
6262
/**
6363
* Represents an XML document in the DOM model.
6464
*/
65-
class Document : public NonCopyable
65+
class LIBXMLPP_API Document : public NonCopyable
6666
{
6767
//Ensure that libxml is properly initialised:
6868
class Init

libxml++/dtd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace xmlpp
2727
/** Represents an XML DTD for validating XML files.
2828
* DTD = %Document Type Definition
2929
*/
30-
class Dtd : public NonCopyable
30+
class LIBXMLPP_API Dtd : public NonCopyable
3131
{
3232
public:
3333
Dtd();

libxml++/exceptions/exception.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class LIBXMLPP_API exception : public std::exception
6060
* @returns A formatted text string. If the error struct does not contain an
6161
* error (error->code == XML_ERR_OK), an empty string is returned.
6262
*/
63+
LIBXMLPP_API
6364
ustring format_xml_error(const _xmlError* error = nullptr);
6465

6566
/** Format a parser error into a text string, suitable for printing.
@@ -71,6 +72,7 @@ ustring format_xml_error(const _xmlError* error = nullptr);
7172
* error (parser_context->lastError.code == XML_ERR_OK), an empty
7273
* string is returned.
7374
*/
75+
LIBXMLPP_API
7476
ustring format_xml_parser_error(const _xmlParserCtxt* parser_context);
7577

7678
/** Format a message from a function with C-style variadic parameters.
@@ -92,6 +94,7 @@ ustring format_xml_parser_error(const _xmlParserCtxt* parser_context);
9294
*
9395
* @newin{3,0}
9496
*/
97+
LIBXMLPP_API
9598
ustring format_printf_message(const char* fmt, va_list args);
9699

97100
} // namespace xmlpp

libxml++/exceptions/internal_error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
namespace xmlpp {
2626

27-
class internal_error : public exception
27+
class LIBXMLPP_API internal_error : public exception
2828
{
2929
public:
3030
explicit internal_error(const ustring& message);

libxml++/exceptions/parse_error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace xmlpp
2727

2828
/** This exception will be thrown when the parser encounters an error in the XML document.
2929
*/
30-
class parse_error : public exception
30+
class LIBXMLPP_API parse_error : public exception
3131
{
3232
public:
3333
explicit parse_error(const ustring& message);

libxml++/exceptions/validity_error.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace xmlpp
2727

2828
/** This exception will be thrown when the parser encounters a validity error in the XML document.
2929
*/
30-
class validity_error : public parse_error
30+
class LIBXMLPP_API validity_error : public parse_error
3131
{
3232
public:
3333
explicit validity_error(const ustring& message);

libxml++/exceptions/wrapped_exception.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace xmlpp
3535
*
3636
* @newin{2,40}
3737
*/
38-
class wrapped_exception : public exception
38+
class LIBXMLPP_API wrapped_exception : public exception
3939
{
4040
public:
4141
explicit wrapped_exception(std::exception_ptr exception_ptr);

libxml++/io/istreamparserinputbuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
namespace xmlpp
1818
{
19-
class IStreamParserInputBuffer: public ParserInputBuffer
19+
class LIBXMLPP_API IStreamParserInputBuffer: public ParserInputBuffer
2020
{
2121
public:
2222
/**

libxml++/io/ostreamoutputbuffer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace xmlpp
1818
{
1919
/** An OutputBuffer implementation that send datas to a std::ostream.
2020
*/
21-
class OStreamOutputBuffer: public OutputBuffer
21+
class LIBXMLPP_API OStreamOutputBuffer: public OutputBuffer
2222
{
2323
public:
2424
/**

libxml++/io/outputbuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ extern "C"
2222

2323
namespace xmlpp
2424
{
25-
struct OutputBufferCallback;
25+
struct LIBXMLPP_API OutputBufferCallback;
2626

2727
/** Base class for xmlOutputBuffer wrapper
2828
*
2929
* It can be derived from to create a new output buffer.
3030
* A child class has to override do_write(), and possibly
3131
* do_close() if some actions are required before buffer closing.
3232
*/
33-
class OutputBuffer: public NonCopyable
33+
class LIBXMLPP_API OutputBuffer: public NonCopyable
3434
{
3535
public:
3636
/**

libxml++/io/parserinputbuffer.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ extern "C"
2020

2121
namespace xmlpp
2222
{
23-
struct ParserInputBufferCallback;
23+
struct LIBXMLPP_API ParserInputBufferCallback;
2424

2525
/** Base class for xmlParserInputBuffer wrapper
2626
*
2727
* It can be derived from to create a new output buffer.
2828
* A child class has to override do_write(), and possibly
2929
* do_close() if some actions are required before buffer closing.
3030
*/
31-
class ParserInputBuffer: public NonCopyable
31+
class LIBXMLPP_API ParserInputBuffer: public NonCopyable
3232
{
3333
public:
3434
ParserInputBuffer();

libxml++/keepblanks.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@
88
#ifndef __LIBXMLPP_KEEPBLANKS_H
99
#define __LIBXMLPP_KEEPBLANKS_H
1010

11+
#include <libxml++config.h>
12+
1113
namespace xmlpp
1214
{
1315
/** This class sets KeepBlanksDefault and IndentTreeOutput of libxmlpp
1416
* and restores their initial values in its destructor. As a consequence
1517
* the wanted setting is kept during instance lifetime.
1618
*/
17-
class KeepBlanks {
19+
class LIBXMLPP_API KeepBlanks {
1820
public:
1921
static const bool Default = true;
2022

libxml++/nodes/cdatanode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace xmlpp
1515
/** CData node. This will be instantiated by the parser.
1616
*
1717
*/
18-
class CdataNode : public ContentNode
18+
class LIBXMLPP_API CdataNode : public ContentNode
1919
{
2020
public:
2121
explicit CdataNode(_xmlNode* node);

libxml++/nodes/commentnode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace xmlpp
1414

1515
/** Comment node. This will be instantiated by the parser.
1616
*/
17-
class CommentNode : public ContentNode
17+
class LIBXMLPP_API CommentNode : public ContentNode
1818
{
1919
public:
2020
explicit CommentNode(_xmlNode* node);

libxml++/nodes/contentnode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace xmlpp
1414

1515
/** Content node. This will be instantiated by the parser.
1616
*/
17-
class ContentNode : public Node
17+
class LIBXMLPP_API ContentNode : public Node
1818
{
1919
public:
2020
explicit ContentNode(_xmlNode* node);

libxml++/nodes/element.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ namespace xmlpp
2121
/** %Element nodes have attributes as well as child nodes.
2222
* This will be instantiated by the parser.
2323
*/
24-
class Element : public Node
24+
class LIBXMLPP_API Element : public Node
2525
{
2626
public:
2727
explicit Element(_xmlNode* node);

libxml++/nodes/entitydeclaration.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ namespace xmlpp
2323
* @newin{2,36}
2424
*
2525
*/
26-
class EntityDeclaration : public ContentNode
26+
class LIBXMLPP_API EntityDeclaration : public ContentNode
2727
{
2828
public:
2929
explicit EntityDeclaration(_xmlNode* node);

libxml++/nodes/entityreference.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace xmlpp
1414

1515
/** Entity references refer to previously declared entities. This will be instantiated by the parser.
1616
*/
17-
class EntityReference : public Node
17+
class LIBXMLPP_API EntityReference : public Node
1818
{
1919
public:
2020
explicit EntityReference(_xmlNode* node);

libxml++/nodes/node.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ extern "C" {
2323
namespace xmlpp
2424
{
2525

26-
class Element;
26+
class LIBXMLPP_API Element;
2727

2828
// xmlpp::XPathResultType is similar to xmlXPathObjectType in libxml2.
2929
/** An XPath expression is evaluated to yield a result, which
@@ -48,7 +48,7 @@ enum class XPathResultType
4848
* manage them for you. Furthermore, Document and Element have methods for
4949
* adding Nodes to a Document.
5050
*/
51-
class Node : public NonCopyable
51+
class LIBXMLPP_API Node : public NonCopyable
5252
{
5353
public:
5454
using NodeList = std::list<Node*>;

libxml++/nodes/processinginstructionnode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace xmlpp
1313
{
1414

15-
class ProcessingInstructionNode : public ContentNode
15+
class LIBXMLPP_API ProcessingInstructionNode : public ContentNode
1616
{
1717
public:
1818
explicit ProcessingInstructionNode(_xmlNode* node);

libxml++/nodes/textnode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ namespace xmlpp
1414

1515
/** Text node. This will be instantiated by the parser.
1616
*/
17-
class TextNode : public ContentNode
17+
class LIBXMLPP_API TextNode : public ContentNode
1818
{
1919
public:
2020
explicit TextNode(_xmlNode* node);

libxml++/nodes/xincludeend.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace xmlpp
2929
*
3030
* @newin{2,36}
3131
*/
32-
class XIncludeEnd : public Node
32+
class LIBXMLPP_API XIncludeEnd : public Node
3333
{
3434
public:
3535
explicit XIncludeEnd(_xmlNode* node);

libxml++/nodes/xincludestart.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ namespace xmlpp
2929
*
3030
* @newin{2,36}
3131
*/
32-
class XIncludeStart : public Node
32+
class LIBXMLPP_API XIncludeStart : public Node
3333
{
3434
public:
3535
explicit XIncludeStart(_xmlNode* node);

libxml++/noncopyable.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
#ifndef __LIBXMLPP_NONCOPYABLE_H
99
#define __LIBXMLPP_NONCOPYABLE_H
1010

11+
#include <libxml++config.h>
12+
1113
namespace xmlpp
1214
{
1315

1416
/** A base for classes which cannot be copied or moved.
1517
*/
16-
class NonCopyable
18+
class LIBXMLPP_API NonCopyable
1719
{
1820
protected:
1921
NonCopyable() noexcept;

libxml++/parsers/domparser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace xmlpp {
1515
/** DOM XML parser.
1616
* DOM = %Document Object Model
1717
*/
18-
class DomParser : public Parser
18+
class LIBXMLPP_API DomParser : public Parser
1919
{
2020
public:
2121
/** Create a parser with an empty document.

libxml++/parsers/parser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace xmlpp {
2828
*
2929
* Abstract base class for DOM parser and SAX parser.
3030
*/
31-
class Parser : public NonCopyable
31+
class LIBXMLPP_API Parser : public NonCopyable
3232
{
3333
public:
3434
Parser();

libxml++/parsers/saxparser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace xmlpp {
3131
* that exception is replaced by a xmlpp::exception before it is propagated
3232
* out of the parse method, such as parse_file().
3333
*/
34-
class SaxParser : public Parser
34+
class LIBXMLPP_API SaxParser : public Parser
3535
{
3636
public:
3737
/**

libxml++/parsers/textreader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace xmlpp
2626
* A reader that provides fast, non-cached, forward-only access to XML data,
2727
* in the style of .Net's <a href="http://msdn.microsoft.com/en-us/library/system.xml.xmltextreader.aspx">XmlTextReader</a> class.
2828
*/
29-
class TextReader: public NonCopyable
29+
class LIBXMLPP_API TextReader: public NonCopyable
3030
{
3131
public:
3232
// xmlpp::TextReader::NodeType is similar to xmlReaderTypes in libxml2.

libxml++/relaxngschema.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace xmlpp
4040
*
4141
* @newin{2,38}
4242
*/
43-
class RelaxNGSchema : public SchemaBase
43+
class LIBXMLPP_API RelaxNGSchema : public SchemaBase
4444
{
4545
public:
4646
RelaxNGSchema();

libxml++/schemabase.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525

2626
namespace xmlpp
2727
{
28-
class Document;
28+
class LIBXMLPP_API Document;
2929

3030
/** Base class for schemas, used for validation of XML files.
3131
*
3232
* @newin{2,38}
3333
*/
34-
class SchemaBase : public NonCopyable
34+
class LIBXMLPP_API SchemaBase : public NonCopyable
3535
{
3636
public:
3737
SchemaBase() noexcept;

libxml++/validators/dtdvalidator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ namespace xmlpp {
1717
/** XML DTD validator.
1818
* DTD = %Document Type Definition
1919
*/
20-
class DtdValidator : public Validator
20+
class LIBXMLPP_API DtdValidator : public Validator
2121
{
2222
public:
2323
DtdValidator();

libxml++/validators/relaxngvalidator.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@
2626

2727
namespace xmlpp
2828
{
29-
class Document;
30-
class RelaxNGSchema;
29+
class LIBXMLPP_API Document;
30+
class LIBXMLPP_API RelaxNGSchema;
3131

3232
/** RelaxNG schema validator.
3333
* RelaxNG = REgular LAnguage for XML Next Generation
3434
*
3535
* @newin{2,38}
3636
*/
37-
class RelaxNGValidator : public SchemaValidatorBase
37+
class LIBXMLPP_API RelaxNGValidator : public SchemaValidatorBase
3838
{
3939
public:
4040
RelaxNGValidator();

0 commit comments

Comments
 (0)