summaryrefslogtreecommitdiff
path: root/qpid/cpp/include/qmf
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2011-05-17 21:02:34 +0000
committerTed Ross <tross@apache.org>2011-05-17 21:02:34 +0000
commit2d0338895a2d3629b674f4a3aabea58c77f76504 (patch)
treeafd48cdc553902b82c5160f5a3d57910b42bda5c /qpid/cpp/include/qmf
parentcc77efaa96a95173fd009a3a5f855e2507da643c (diff)
downloadqpid-python-2d0338895a2d3629b674f4a3aabea58c77f76504.tar.gz
QPID-3186 - Import Export generalization to support a larger set of compilers and run time environments
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1104559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/include/qmf')
-rw-r--r--qpid/cpp/include/qmf/Agent.h2
-rw-r--r--qpid/cpp/include/qmf/AgentEvent.h2
-rw-r--r--qpid/cpp/include/qmf/AgentSession.h2
-rw-r--r--qpid/cpp/include/qmf/ConsoleEvent.h2
-rw-r--r--qpid/cpp/include/qmf/ConsoleSession.h2
-rw-r--r--qpid/cpp/include/qmf/Data.h2
-rw-r--r--qpid/cpp/include/qmf/DataAddr.h2
-rw-r--r--qpid/cpp/include/qmf/Handle.h10
-rw-r--r--qpid/cpp/include/qmf/ImportExport.h16
-rw-r--r--qpid/cpp/include/qmf/Query.h2
-rw-r--r--qpid/cpp/include/qmf/Schema.h2
-rw-r--r--qpid/cpp/include/qmf/SchemaId.h2
-rw-r--r--qpid/cpp/include/qmf/SchemaMethod.h2
-rw-r--r--qpid/cpp/include/qmf/SchemaProperty.h2
-rw-r--r--qpid/cpp/include/qmf/Subscription.h2
-rw-r--r--qpid/cpp/include/qmf/engine/QmfEngineImportExport.h9
-rw-r--r--qpid/cpp/include/qmf/exceptions.h8
17 files changed, 40 insertions, 29 deletions
diff --git a/qpid/cpp/include/qmf/Agent.h b/qpid/cpp/include/qmf/Agent.h
index 8c0f48b8b1..94083be4f3 100644
--- a/qpid/cpp/include/qmf/Agent.h
+++ b/qpid/cpp/include/qmf/Agent.h
@@ -42,7 +42,7 @@ namespace qmf {
class SchemaId;
class Schema;
- class Agent : public qmf::Handle<AgentImpl> {
+ class QMF_CLASS_EXTERN Agent : public qmf::Handle<AgentImpl> {
public:
QMF_EXTERN Agent(AgentImpl* impl = 0);
QMF_EXTERN Agent(const Agent&);
diff --git a/qpid/cpp/include/qmf/AgentEvent.h b/qpid/cpp/include/qmf/AgentEvent.h
index 59a41c3267..0f93a9bb0a 100644
--- a/qpid/cpp/include/qmf/AgentEvent.h
+++ b/qpid/cpp/include/qmf/AgentEvent.h
@@ -46,7 +46,7 @@ namespace qmf {
AGENT_THREAD_FAILED = 8
};
- class AgentEvent : public qmf::Handle<AgentEventImpl> {
+ class QMF_CLASS_EXTERN AgentEvent : public qmf::Handle<AgentEventImpl> {
public:
QMF_EXTERN AgentEvent(AgentEventImpl* impl = 0);
QMF_EXTERN AgentEvent(const AgentEvent&);
diff --git a/qpid/cpp/include/qmf/AgentSession.h b/qpid/cpp/include/qmf/AgentSession.h
index 39d921a8ec..1eeb252143 100644
--- a/qpid/cpp/include/qmf/AgentSession.h
+++ b/qpid/cpp/include/qmf/AgentSession.h
@@ -40,7 +40,7 @@ namespace qmf {
class Data;
class DataAddr;
- class AgentSession : public qmf::Handle<AgentSessionImpl> {
+ class QMF_CLASS_EXTERN AgentSession : public qmf::Handle<AgentSessionImpl> {
public:
QMF_EXTERN AgentSession(AgentSessionImpl* impl = 0);
QMF_EXTERN AgentSession(const AgentSession&);
diff --git a/qpid/cpp/include/qmf/ConsoleEvent.h b/qpid/cpp/include/qmf/ConsoleEvent.h
index b836b629af..94600f9357 100644
--- a/qpid/cpp/include/qmf/ConsoleEvent.h
+++ b/qpid/cpp/include/qmf/ConsoleEvent.h
@@ -57,7 +57,7 @@ namespace qmf {
AGENT_DEL_FILTER = 2
};
- class ConsoleEvent : public qmf::Handle<ConsoleEventImpl> {
+ class QMF_CLASS_EXTERN ConsoleEvent : public qmf::Handle<ConsoleEventImpl> {
public:
QMF_EXTERN ConsoleEvent(ConsoleEventImpl* impl = 0);
QMF_EXTERN ConsoleEvent(const ConsoleEvent&);
diff --git a/qpid/cpp/include/qmf/ConsoleSession.h b/qpid/cpp/include/qmf/ConsoleSession.h
index 896f8ffda7..6008036eec 100644
--- a/qpid/cpp/include/qmf/ConsoleSession.h
+++ b/qpid/cpp/include/qmf/ConsoleSession.h
@@ -38,7 +38,7 @@ namespace qmf {
class ConsoleSessionImpl;
class ConsoleEvent;
- class ConsoleSession : public qmf::Handle<ConsoleSessionImpl> {
+ class QMF_CLASS_EXTERN ConsoleSession : public qmf::Handle<ConsoleSessionImpl> {
public:
QMF_EXTERN ConsoleSession(ConsoleSessionImpl* impl = 0);
QMF_EXTERN ConsoleSession(const ConsoleSession&);
diff --git a/qpid/cpp/include/qmf/Data.h b/qpid/cpp/include/qmf/Data.h
index 82f1569a0b..487a02fe95 100644
--- a/qpid/cpp/include/qmf/Data.h
+++ b/qpid/cpp/include/qmf/Data.h
@@ -39,7 +39,7 @@ namespace qmf {
class DataAddr;
class Agent;
- class Data : public qmf::Handle<DataImpl> {
+ class QMF_CLASS_EXTERN Data : public qmf::Handle<DataImpl> {
public:
QMF_EXTERN Data(DataImpl* impl = 0);
QMF_EXTERN Data(const Data&);
diff --git a/qpid/cpp/include/qmf/DataAddr.h b/qpid/cpp/include/qmf/DataAddr.h
index 72de0c986a..63d309cc4b 100644
--- a/qpid/cpp/include/qmf/DataAddr.h
+++ b/qpid/cpp/include/qmf/DataAddr.h
@@ -34,7 +34,7 @@ namespace qmf {
class DataAddrImpl;
- class DataAddr : public qmf::Handle<DataAddrImpl> {
+ class QMF_CLASS_EXTERN DataAddr : public qmf::Handle<DataAddrImpl> {
public:
QMF_EXTERN DataAddr(DataAddrImpl* impl = 0);
QMF_EXTERN DataAddr(const DataAddr&);
diff --git a/qpid/cpp/include/qmf/Handle.h b/qpid/cpp/include/qmf/Handle.h
index 510e2993aa..50971ea626 100644
--- a/qpid/cpp/include/qmf/Handle.h
+++ b/qpid/cpp/include/qmf/Handle.h
@@ -39,22 +39,22 @@ template <class T> class Handle {
public:
/**@return true if handle is valid, i.e. not null. */
- QMF_EXTERN bool isValid() const { return impl; }
+ QMF_INLINE_EXTERN bool isValid() const { return impl; }
/**@return true if handle is null. It is an error to call any function on a null handle. */
- QMF_EXTERN bool isNull() const { return !impl; }
+ QMF_INLINE_EXTERN bool isNull() const { return !impl; }
/** Conversion to bool supports idiom if (handle) { handle->... } */
- QMF_EXTERN operator bool() const { return impl; }
+ QMF_INLINE_EXTERN operator bool() const { return impl; }
/** Operator ! supports idiom if (!handle) { do_if_handle_is_null(); } */
- QMF_EXTERN bool operator !() const { return !impl; }
+ QMF_INLINE_EXTERN bool operator !() const { return !impl; }
void swap(Handle<T>& h) { T* t = h.impl; h.impl = impl; impl = t; }
protected:
typedef T Impl;
- QMF_EXTERN Handle() :impl() {}
+ QMF_INLINE_EXTERN Handle() :impl() {}
// Not implemented,subclasses must implement.
QMF_EXTERN Handle(const Handle&);
diff --git a/qpid/cpp/include/qmf/ImportExport.h b/qpid/cpp/include/qmf/ImportExport.h
index f5e1d9127c..7405c15259 100644
--- a/qpid/cpp/include/qmf/ImportExport.h
+++ b/qpid/cpp/include/qmf/ImportExport.h
@@ -20,14 +20,16 @@
* under the License.
*/
-#if defined(WIN32) && !defined(QPID_DECLARE_STATIC)
-# if defined(QMF_EXPORT) || defined (qmfcommon_EXPORTS)
-# define QMF_EXTERN __declspec(dllexport)
-# else
-# define QMF_EXTERN __declspec(dllimport)
-# endif
+#include "qpid/ImportExport.h"
+
+#if defined(QMF_EXPORT) || defined (qmf2_EXPORTS)
+# define QMF_EXTERN QPID_EXPORT
+# define QMF_CLASS_EXTERN QPID_CLASS_EXPORT
+# define QMF_INLINE_EXTERN QPID_INLINE_EXPORT
#else
-# define QMF_EXTERN
+# define QMF_EXTERN QPID_IMPORT
+# define QMF_CLASS_EXTERN QPID_CLASS_IMPORT
+# define QMF_INLINE_EXTERN QPID_INLINE_IMPORT
#endif
#endif
diff --git a/qpid/cpp/include/qmf/Query.h b/qpid/cpp/include/qmf/Query.h
index 1867b59d81..c1264f8901 100644
--- a/qpid/cpp/include/qmf/Query.h
+++ b/qpid/cpp/include/qmf/Query.h
@@ -43,7 +43,7 @@ namespace qmf {
QUERY_SCHEMA_ID = 4
};
- class Query : public qmf::Handle<QueryImpl> {
+ class QMF_CLASS_EXTERN Query : public qmf::Handle<QueryImpl> {
public:
QMF_EXTERN Query(QueryImpl* impl = 0);
QMF_EXTERN Query(const Query&);
diff --git a/qpid/cpp/include/qmf/Schema.h b/qpid/cpp/include/qmf/Schema.h
index cf316138c1..6cfd2e2a56 100644
--- a/qpid/cpp/include/qmf/Schema.h
+++ b/qpid/cpp/include/qmf/Schema.h
@@ -38,7 +38,7 @@ namespace qmf {
class SchemaProperty;
class SchemaMethod;
- class Schema : public qmf::Handle<SchemaImpl> {
+ class QMF_CLASS_EXTERN Schema : public qmf::Handle<SchemaImpl> {
public:
QMF_EXTERN Schema(SchemaImpl* impl = 0);
QMF_EXTERN Schema(const Schema&);
diff --git a/qpid/cpp/include/qmf/SchemaId.h b/qpid/cpp/include/qmf/SchemaId.h
index 13fb1cb902..2dafc1c091 100644
--- a/qpid/cpp/include/qmf/SchemaId.h
+++ b/qpid/cpp/include/qmf/SchemaId.h
@@ -35,7 +35,7 @@ namespace qmf {
class SchemaIdImpl;
- class SchemaId : public qmf::Handle<SchemaIdImpl> {
+ class QMF_CLASS_EXTERN SchemaId : public qmf::Handle<SchemaIdImpl> {
public:
QMF_EXTERN SchemaId(SchemaIdImpl* impl = 0);
QMF_EXTERN SchemaId(const SchemaId&);
diff --git a/qpid/cpp/include/qmf/SchemaMethod.h b/qpid/cpp/include/qmf/SchemaMethod.h
index 47302b62b9..b5944dc29e 100644
--- a/qpid/cpp/include/qmf/SchemaMethod.h
+++ b/qpid/cpp/include/qmf/SchemaMethod.h
@@ -36,7 +36,7 @@ namespace qmf {
class SchemaMethodImpl;
class SchemaProperty;
- class SchemaMethod : public qmf::Handle<SchemaMethodImpl> {
+ class QMF_CLASS_EXTERN SchemaMethod : public qmf::Handle<SchemaMethodImpl> {
public:
QMF_EXTERN SchemaMethod(SchemaMethodImpl* impl = 0);
QMF_EXTERN SchemaMethod(const SchemaMethod&);
diff --git a/qpid/cpp/include/qmf/SchemaProperty.h b/qpid/cpp/include/qmf/SchemaProperty.h
index a3a328b60b..bbb603fa50 100644
--- a/qpid/cpp/include/qmf/SchemaProperty.h
+++ b/qpid/cpp/include/qmf/SchemaProperty.h
@@ -36,7 +36,7 @@ namespace qmf {
class SchemaPropertyImpl;
- class SchemaProperty : public Handle<SchemaPropertyImpl> {
+ class QMF_CLASS_EXTERN SchemaProperty : public Handle<SchemaPropertyImpl> {
public:
QMF_EXTERN SchemaProperty(SchemaPropertyImpl* impl = 0);
QMF_EXTERN SchemaProperty(const SchemaProperty&);
diff --git a/qpid/cpp/include/qmf/Subscription.h b/qpid/cpp/include/qmf/Subscription.h
index 0a01b7c526..398a45b922 100644
--- a/qpid/cpp/include/qmf/Subscription.h
+++ b/qpid/cpp/include/qmf/Subscription.h
@@ -35,7 +35,7 @@ namespace qmf {
class SubscriptionImpl;
class Data;
- class Subscription : public qmf::Handle<SubscriptionImpl> {
+ class QMF_CLASS_EXTERN Subscription : public qmf::Handle<SubscriptionImpl> {
public:
QMF_EXTERN Subscription(SubscriptionImpl* impl = 0);
QMF_EXTERN Subscription(const Subscription&);
diff --git a/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h b/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h
index 373617e046..cf8fffdb17 100644
--- a/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h
+++ b/qpid/cpp/include/qmf/engine/QmfEngineImportExport.h
@@ -26,8 +26,17 @@
# else
# define QMFE_EXTERN __declspec(dllimport)
# endif
+# ifdef _MSC_VER
+# define QMFE_CLASS_EXTERN
+# define QMFE_INLINE_EXTERN QMFE_EXTERN
+# else
+# define QMFE_CLASS_EXTERN QMFE_EXTERN
+# define QMFE_INLINE_EXTERN
+# endif
#else
# define QMFE_EXTERN
+# define QMFE_CLASS_EXTERN
+# define QMFE_INLINE_EXTERN
#endif
#endif
diff --git a/qpid/cpp/include/qmf/exceptions.h b/qpid/cpp/include/qmf/exceptions.h
index 7959499d63..c7ffa68ce2 100644
--- a/qpid/cpp/include/qmf/exceptions.h
+++ b/qpid/cpp/include/qmf/exceptions.h
@@ -31,24 +31,24 @@ namespace qmf {
/** \ingroup qmf
*/
- struct QmfException : public qpid::types::Exception {
+ struct QMF_CLASS_EXTERN QmfException : public qpid::types::Exception {
QMF_EXTERN QmfException(const std::string& msg);
QMF_EXTERN virtual ~QmfException() throw();
qpid::types::Variant::Map detail;
};
- struct KeyNotFound : public QmfException {
+ struct QMF_CLASS_EXTERN KeyNotFound : public QmfException {
QMF_EXTERN KeyNotFound(const std::string& msg);
QMF_EXTERN virtual ~KeyNotFound() throw();
};
- struct IndexOutOfRange : public QmfException {
+ struct QMF_CLASS_EXTERN IndexOutOfRange : public QmfException {
QMF_EXTERN IndexOutOfRange();
QMF_EXTERN virtual ~IndexOutOfRange() throw();
};
- struct OperationTimedOut : public QmfException {
+ struct QMF_CLASS_EXTERN OperationTimedOut : public QmfException {
QMF_EXTERN OperationTimedOut();
QMF_EXTERN virtual ~OperationTimedOut() throw();
};