diff --git a/pvDataApp/factory/Compare.cpp b/pvDataApp/factory/Compare.cpp index 79cd817..b80ab00 100644 --- a/pvDataApp/factory/Compare.cpp +++ b/pvDataApp/factory/Compare.cpp @@ -7,6 +7,7 @@ * @author mes */ +#define epicsExportSharedSymbols #include #include diff --git a/pvDataApp/factory/Convert.cpp b/pvDataApp/factory/Convert.cpp index 73620ad..fde0a0b 100644 --- a/pvDataApp/factory/Convert.cpp +++ b/pvDataApp/factory/Convert.cpp @@ -12,6 +12,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/FieldCreateFactory.cpp b/pvDataApp/factory/FieldCreateFactory.cpp index b34f304..547a80a 100644 --- a/pvDataApp/factory/FieldCreateFactory.cpp +++ b/pvDataApp/factory/FieldCreateFactory.cpp @@ -12,6 +12,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include @@ -124,7 +126,7 @@ void Scalar::serialize(ByteBuffer *buffer, SerializableControl *control) const { buffer->putByte(getTypeCodeLUT()); } -void Scalar::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*control*/) { +void Scalar::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*control*/) { // must be done via FieldCreate throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead"); } @@ -270,7 +272,7 @@ void ScalarArray::serialize(ByteBuffer *buffer, SerializableControl *control) co buffer->putByte(0x10 | getTypeCodeLUT()); } -void ScalarArray::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*control*/) { +void ScalarArray::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*control*/) { throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead"); } @@ -300,7 +302,7 @@ void StructureArray::serialize(ByteBuffer *buffer, SerializableControl *control) control->cachedSerialize(pstructure, buffer); } -void StructureArray::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*control*/) { +void StructureArray::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*control*/) { throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead"); } @@ -338,7 +340,7 @@ void UnionArray::serialize(ByteBuffer *buffer, SerializableControl *control) con } } -void UnionArray::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*control*/) { +void UnionArray::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*control*/) { throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead"); } @@ -456,7 +458,7 @@ void Structure::serialize(ByteBuffer *buffer, SerializableControl *control) cons serializeStructureField(this, buffer, control); } -void Structure::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*control*/) { +void Structure::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*control*/) { throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead"); } @@ -601,7 +603,7 @@ void Union::serialize(ByteBuffer *buffer, SerializableControl *control) const { } } -void Union::deserialize(ByteBuffer */*buffer*/, DeserializableControl */*control*/) { +void Union::deserialize(ByteBuffer* /*buffer*/, DeserializableControl* /*control*/) { throw std::runtime_error("not valid operation, use FieldCreate::deserialize instead"); } diff --git a/pvDataApp/factory/PVArray.cpp b/pvDataApp/factory/PVArray.cpp index 19e3b88..b593074 100644 --- a/pvDataApp/factory/PVArray.cpp +++ b/pvDataApp/factory/PVArray.cpp @@ -12,6 +12,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include diff --git a/pvDataApp/factory/PVAuxInfoImpl.cpp b/pvDataApp/factory/PVAuxInfoImpl.cpp index e0885fc..907b580 100644 --- a/pvDataApp/factory/PVAuxInfoImpl.cpp +++ b/pvDataApp/factory/PVAuxInfoImpl.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/PVDataCreateFactory.cpp b/pvDataApp/factory/PVDataCreateFactory.cpp index a3a485f..f2113f3 100644 --- a/pvDataApp/factory/PVDataCreateFactory.cpp +++ b/pvDataApp/factory/PVDataCreateFactory.cpp @@ -14,6 +14,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/PVField.cpp b/pvDataApp/factory/PVField.cpp index 4477831..7aa03ea 100644 --- a/pvDataApp/factory/PVField.cpp +++ b/pvDataApp/factory/PVField.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/PVScalar.cpp b/pvDataApp/factory/PVScalar.cpp index e04bca8..fd4b6d5 100644 --- a/pvDataApp/factory/PVScalar.cpp +++ b/pvDataApp/factory/PVScalar.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include diff --git a/pvDataApp/factory/PVScalarArray.cpp b/pvDataApp/factory/PVScalarArray.cpp index 19d0339..4ab6515 100644 --- a/pvDataApp/factory/PVScalarArray.cpp +++ b/pvDataApp/factory/PVScalarArray.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include diff --git a/pvDataApp/factory/PVStructure.cpp b/pvDataApp/factory/PVStructure.cpp index ed78156..cf0e592 100644 --- a/pvDataApp/factory/PVStructure.cpp +++ b/pvDataApp/factory/PVStructure.cpp @@ -12,6 +12,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/PVStructureArray.cpp b/pvDataApp/factory/PVStructureArray.cpp index 2731b83..4f0295c 100644 --- a/pvDataApp/factory/PVStructureArray.cpp +++ b/pvDataApp/factory/PVStructureArray.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/PVUnion.cpp b/pvDataApp/factory/PVUnion.cpp index 7ea71df..dfa5204 100644 --- a/pvDataApp/factory/PVUnion.cpp +++ b/pvDataApp/factory/PVUnion.cpp @@ -12,6 +12,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/PVUnionArray.cpp b/pvDataApp/factory/PVUnionArray.cpp index 03217f1..4d19a03 100644 --- a/pvDataApp/factory/PVUnionArray.cpp +++ b/pvDataApp/factory/PVUnionArray.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/StandardField.cpp b/pvDataApp/factory/StandardField.cpp index 172af00..0543b54 100644 --- a/pvDataApp/factory/StandardField.cpp +++ b/pvDataApp/factory/StandardField.cpp @@ -12,6 +12,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/StandardPVField.cpp b/pvDataApp/factory/StandardPVField.cpp index 80058f9..7d3ffac 100644 --- a/pvDataApp/factory/StandardPVField.cpp +++ b/pvDataApp/factory/StandardPVField.cpp @@ -11,6 +11,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/TypeFunc.cpp b/pvDataApp/factory/TypeFunc.cpp index eceaa15..b593106 100644 --- a/pvDataApp/factory/TypeFunc.cpp +++ b/pvDataApp/factory/TypeFunc.cpp @@ -12,6 +12,7 @@ #include #include +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/factory/printer.cpp b/pvDataApp/factory/printer.cpp index 5c8a68f..8d74304 100644 --- a/pvDataApp/factory/printer.cpp +++ b/pvDataApp/factory/printer.cpp @@ -1,7 +1,14 @@ - +/* printer.cpp */ +/** + * Copyright - See the COPYRIGHT that is included with this distribution. + * EPICS pvData is distributed subject to a Software License Agreement found + * in file LICENSE that is included with this distribution. + */ + #include -#include "pv/printer.h" +#define epicsExportSharedSymbols +#include namespace { diff --git a/pvDataApp/factory/pvSubArrayCopy.cpp b/pvDataApp/factory/pvSubArrayCopy.cpp index 44cd1eb..c89aef2 100644 --- a/pvDataApp/factory/pvSubArrayCopy.cpp +++ b/pvDataApp/factory/pvSubArrayCopy.cpp @@ -11,6 +11,7 @@ #include #include +#define epicsExportSharedSymbols #include namespace epics { namespace pvData { diff --git a/pvDataApp/misc/bitSet.cpp b/pvDataApp/misc/bitSet.cpp index e5660a9..df29901 100644 --- a/pvDataApp/misc/bitSet.cpp +++ b/pvDataApp/misc/bitSet.cpp @@ -7,12 +7,14 @@ /** * @author mes */ -#include "string.h" -#include "stdio.h" +#include +#include #include -#include + +#define epicsExportSharedSymbols #include #include +#include namespace epics { namespace pvData { diff --git a/pvDataApp/misc/bitSet.h b/pvDataApp/misc/bitSet.h index 1e2508f..ac8d694 100644 --- a/pvDataApp/misc/bitSet.h +++ b/pvDataApp/misc/bitSet.h @@ -9,11 +9,15 @@ */ #ifndef BITSET_H #define BITSET_H + #include + #include #include #include +#include + namespace epics { namespace pvData { class BitSet; @@ -42,7 +46,7 @@ namespace epics { namespace pvData { * * Based on Java implementation. */ - class BitSet : public Serializable { + class epicsShareClass BitSet : public Serializable { public: POINTER_DEFINITIONS(BitSet); static BitSetPtr create(uint32 nbits); diff --git a/pvDataApp/misc/byteBuffer.h b/pvDataApp/misc/byteBuffer.h index 903daf2..3b2732b 100644 --- a/pvDataApp/misc/byteBuffer.h +++ b/pvDataApp/misc/byteBuffer.h @@ -12,11 +12,21 @@ #include #include -#include -#include - #include +#ifdef epicsExportSharedSymbols +#define byteBufferepicsExportSharedSymbols +#undef epicsExportSharedSymbols +#endif + +#include + +#ifdef byteBufferepicsExportSharedSymbols +#define epicsExportSharedSymbols +#undef byteBufferepicsExportSharedSymbols +#endif +#include + namespace epics { namespace pvData { diff --git a/pvDataApp/misc/destroyable.h b/pvDataApp/misc/destroyable.h index 0261371..6f2979b 100644 --- a/pvDataApp/misc/destroyable.h +++ b/pvDataApp/misc/destroyable.h @@ -12,6 +12,8 @@ #include +#include + namespace epics { namespace pvData { @@ -19,7 +21,7 @@ namespace epics { namespace pvData { * Instance declaring destroy method. * @author mse */ - class Destroyable { + class epicsShareClass Destroyable { public: POINTER_DEFINITIONS(Destroyable); /** diff --git a/pvDataApp/misc/epicsException.cpp b/pvDataApp/misc/epicsException.cpp index d7df9e2..534f6f9 100644 --- a/pvDataApp/misc/epicsException.cpp +++ b/pvDataApp/misc/epicsException.cpp @@ -7,14 +7,15 @@ * @author mes */ -#include - #include - #include #include -namespace epics{namespace pvData{ +#define epicsExportSharedSymbols +#include + + +namespace epics{ namespace pvData { void ExceptionMixin::print(FILE *fp) const diff --git a/pvDataApp/misc/epicsException.h b/pvDataApp/misc/epicsException.h index b7bfad6..da6bc58 100644 --- a/pvDataApp/misc/epicsException.h +++ b/pvDataApp/misc/epicsException.h @@ -43,6 +43,8 @@ #include #include +#include + // Users may redefine this for a large size if desired #ifndef EXCEPT_DEPTH # define EXCEPT_DEPTH 20 @@ -67,7 +69,7 @@ namespace epics { namespace pvData { /* Stores file and line number given, and when possible the call stack * at the point where it was constructed */ -class ExceptionMixin { +class epicsShareClass ExceptionMixin { const char *m_file; int m_line; #ifndef EXCEPT_USE_NONE @@ -197,7 +199,7 @@ do { \ #endif // THROW_EXCEPTION_COMPAT -class BaseException : public std::logic_error { +class epicsShareClass BaseException : public std::logic_error { public: explicit BaseException(const std::string msg) : std::logic_error(msg) {} diff --git a/pvDataApp/misc/event.cpp b/pvDataApp/misc/event.cpp index eac5dac..a7f829f 100644 --- a/pvDataApp/misc/event.cpp +++ b/pvDataApp/misc/event.cpp @@ -19,6 +19,8 @@ #include #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/misc/event.h b/pvDataApp/misc/event.h index a7f5bc1..99c1295 100644 --- a/pvDataApp/misc/event.h +++ b/pvDataApp/misc/event.h @@ -9,18 +9,22 @@ */ #ifndef EVENT_H #define EVENT_H + #include #include #include + #include #include +#include + namespace epics { namespace pvData { class Event; typedef std::tr1::shared_ptr EventPtr; -class Event { +class epicsShareClass Event { public: POINTER_DEFINITIONS(Event); explicit Event(bool = false); diff --git a/pvDataApp/misc/executor.cpp b/pvDataApp/misc/executor.cpp index da55915..ebb43ed 100644 --- a/pvDataApp/misc/executor.cpp +++ b/pvDataApp/misc/executor.cpp @@ -13,6 +13,7 @@ #include #include +#define epicsExportSharedSymbols #include namespace epics { namespace pvData { diff --git a/pvDataApp/misc/executor.h b/pvDataApp/misc/executor.h index c311d4b..d84fd4d 100644 --- a/pvDataApp/misc/executor.h +++ b/pvDataApp/misc/executor.h @@ -9,13 +9,17 @@ */ #ifndef EXECUTOR_H #define EXECUTOR_H + #include + #include #include #include #include #include +#include + namespace epics { namespace pvData { class Command; @@ -23,7 +27,7 @@ class Executor; typedef std::tr1::shared_ptr CommandPtr; typedef std::tr1::shared_ptr ExecutorPtr; -class Command { +class epicsShareClass Command { public: POINTER_DEFINITIONS(Command); virtual ~Command(){} @@ -33,7 +37,7 @@ private: friend class Executor; }; -class Executor : public Runnable{ +class epicsShareClass Executor : public Runnable{ public: POINTER_DEFINITIONS(Executor); Executor(String threadName,ThreadPriority priority); diff --git a/pvDataApp/misc/localStaticLock.cpp b/pvDataApp/misc/localStaticLock.cpp index 8f0360b..38a7ed1 100644 --- a/pvDataApp/misc/localStaticLock.cpp +++ b/pvDataApp/misc/localStaticLock.cpp @@ -8,6 +8,7 @@ * @author mse */ +#define epicsExportSharedSymbols #include static int nifty_counter; diff --git a/pvDataApp/misc/localStaticLock.h b/pvDataApp/misc/localStaticLock.h index db2b365..e60492a 100644 --- a/pvDataApp/misc/localStaticLock.h +++ b/pvDataApp/misc/localStaticLock.h @@ -12,7 +12,9 @@ #include -extern epics::pvData::Mutex& getLocalStaticInitMutex(); +#include + +epicsShareExtern epics::pvData::Mutex& getLocalStaticInitMutex(); #if defined(__GNUC__) && __GNUC__ >= 4 // noop @@ -21,7 +23,7 @@ extern epics::pvData::Mutex& getLocalStaticInitMutex(); #define LOCAL_STATIC_LOCK epics::pvData::Lock localStaticInitMutexLock(getLocalStaticInitMutex()); #endif -static class MutexInitializer { +static class epicsShareClass MutexInitializer { public: MutexInitializer (); ~MutexInitializer (); diff --git a/pvDataApp/misc/lock.h b/pvDataApp/misc/lock.h index 2147053..06f3570 100644 --- a/pvDataApp/misc/lock.h +++ b/pvDataApp/misc/lock.h @@ -9,9 +9,14 @@ */ #ifndef LOCK_H #define LOCK_H + #include #include + #include + +#include + /* This is based on item 14 of * Effective C++, Third Edition, Scott Meyers */ @@ -22,7 +27,7 @@ namespace epics { namespace pvData { typedef epicsMutex Mutex; -class Lock : private NoDefaultMethods { +class epicsShareClass Lock : private NoDefaultMethods { public: explicit Lock(Mutex &m) : mutexPtr(m), locked(true) diff --git a/pvDataApp/misc/messageQueue.cpp b/pvDataApp/misc/messageQueue.cpp index 4fbdb49..937edc8 100644 --- a/pvDataApp/misc/messageQueue.cpp +++ b/pvDataApp/misc/messageQueue.cpp @@ -8,7 +8,10 @@ * @author mrk */ #include + +#define epicsExportSharedSymbols #include + namespace epics { namespace pvData { MessageNode::MessageNode() diff --git a/pvDataApp/misc/messageQueue.h b/pvDataApp/misc/messageQueue.h index d2707d5..62f92aa 100644 --- a/pvDataApp/misc/messageQueue.h +++ b/pvDataApp/misc/messageQueue.h @@ -18,6 +18,8 @@ #include #include +#include + namespace epics { namespace pvData { class MessageNode; @@ -26,7 +28,7 @@ typedef std::tr1::shared_ptr MessageNodePtr; typedef std::vector MessageNodePtrArray; typedef std::tr1::shared_ptr MessageQueuePtr; -class MessageNode { +class epicsShareClass MessageNode { public: MessageNode(); String getMessage() const; @@ -37,7 +39,7 @@ private: friend class MessageQueue; }; -class MessageQueue : public Queue { +class epicsShareClass MessageQueue : public Queue { public: POINTER_DEFINITIONS(MessageQueue); static MessageQueuePtr create(int size); diff --git a/pvDataApp/misc/noDefaultMethods.h b/pvDataApp/misc/noDefaultMethods.h index 6ce31e1..146e15d 100644 --- a/pvDataApp/misc/noDefaultMethods.h +++ b/pvDataApp/misc/noDefaultMethods.h @@ -9,13 +9,16 @@ */ #ifndef NO_DEFAULT_METHODS_H #define NO_DEFAULT_METHODS_H + +#include + namespace epics { namespace pvData { /* This is based on Item 6 of * Effective C++, Third Edition, Scott Meyers */ - class NoDefaultMethods { + class epicsShareClass NoDefaultMethods { protected: // allow by derived objects NoDefaultMethods(){}; diff --git a/pvDataApp/misc/parseToPOD.cpp b/pvDataApp/misc/parseToPOD.cpp index 9ec4178..f80923a 100644 --- a/pvDataApp/misc/parseToPOD.cpp +++ b/pvDataApp/misc/parseToPOD.cpp @@ -13,6 +13,7 @@ #include "typeCast.h" // need to use "long long" when sizeof(int)==sizeof(long) +// TODO does not work on Darwin 10.6 #if ULONG_MAX == 0xfffffffful #define NEED_LONGLONG #endif diff --git a/pvDataApp/misc/queue.h b/pvDataApp/misc/queue.h index dea98f2..8ff4f84 100644 --- a/pvDataApp/misc/queue.h +++ b/pvDataApp/misc/queue.h @@ -7,12 +7,15 @@ /** * @author mrk */ +#ifndef QUEUE_H +#define QUEUE_H + #include #include #include + #include -#ifndef QUEUE_H -#define QUEUE_H + namespace epics { namespace pvData { template diff --git a/pvDataApp/misc/requester.cpp b/pvDataApp/misc/requester.cpp index a8e5862..d975f34 100644 --- a/pvDataApp/misc/requester.cpp +++ b/pvDataApp/misc/requester.cpp @@ -9,15 +9,18 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include + namespace epics { namespace pvData { -const size_t messageTypeCount = 4; -static StringArray messageTypeName(messageTypeCount); +static StringArray messageTypeName(MESSAGE_TYPE_COUNT); String getMessageTypeName(MessageType messageType) { + // TODO not thread-safe static Mutex mutex; Lock xx(mutex); if(messageTypeName[0].size()==0) { diff --git a/pvDataApp/misc/requester.h b/pvDataApp/misc/requester.h index 14d0e2c..bd15640 100644 --- a/pvDataApp/misc/requester.h +++ b/pvDataApp/misc/requester.h @@ -10,9 +10,12 @@ #ifndef REQUESTER_H #define REQUESTER_H #include + #include #include +#include + namespace epics { namespace pvData { class Requester; @@ -21,10 +24,11 @@ typedef std::tr1::shared_ptr RequesterPtr; enum MessageType { infoMessage,warningMessage,errorMessage,fatalErrorMessage }; +#define MESSAGE_TYPE_COUNT 4 -extern String getMessageTypeName(MessageType messageType); -extern const size_t messageTypeCount; -class Requester { +epicsShareExtern String getMessageTypeName(MessageType messageType); + +class epicsShareClass Requester { public: POINTER_DEFINITIONS(Requester); virtual ~Requester(){} diff --git a/pvDataApp/misc/serialize.h b/pvDataApp/misc/serialize.h index 6e19fe7..c8cce2e 100644 --- a/pvDataApp/misc/serialize.h +++ b/pvDataApp/misc/serialize.h @@ -9,8 +9,12 @@ */ #ifndef SERIALIZE_H #define SERIALIZE_H + #include #include + +#include + namespace epics { namespace pvData { class SerializableControl; @@ -21,7 +25,7 @@ namespace epics { namespace pvData { class BitSet; class Field; - class SerializableControl { + class epicsShareClass SerializableControl { public: virtual ~SerializableControl(){} virtual void flushSerializeBuffer() =0; @@ -32,7 +36,7 @@ namespace epics { namespace pvData { virtual void cachedSerialize(std::tr1::shared_ptr const & field, ByteBuffer* buffer) = 0; }; - class DeserializableControl { + class epicsShareClass DeserializableControl { public: virtual ~DeserializableControl(){} virtual void ensureData(std::size_t size) =0; @@ -42,7 +46,7 @@ namespace epics { namespace pvData { virtual std::tr1::shared_ptr cachedDeserialize(ByteBuffer* buffer) = 0; }; - class Serializable { + class epicsShareClass Serializable { public: virtual ~Serializable(){} virtual void serialize(ByteBuffer *buffer, @@ -51,7 +55,7 @@ namespace epics { namespace pvData { DeserializableControl *flusher) = 0; }; - class BitSetSerializable { + class epicsShareClass BitSetSerializable { public: virtual ~BitSetSerializable(){} virtual void serialize(ByteBuffer *buffer, @@ -61,7 +65,7 @@ namespace epics { namespace pvData { }; - class SerializableArray : virtual public Serializable { + class epicsShareClass SerializableArray : virtual public Serializable { public: virtual ~SerializableArray(){} virtual void serialize(ByteBuffer *buffer, diff --git a/pvDataApp/misc/serializeHelper.cpp b/pvDataApp/misc/serializeHelper.cpp index 75804ea..35f44b8 100644 --- a/pvDataApp/misc/serializeHelper.cpp +++ b/pvDataApp/misc/serializeHelper.cpp @@ -11,13 +11,13 @@ */ #include -#include +#define epicsExportSharedSymbols +#include #include #include #include - using namespace std; namespace epics { diff --git a/pvDataApp/misc/serializeHelper.h b/pvDataApp/misc/serializeHelper.h index 0592d6c..b033250 100644 --- a/pvDataApp/misc/serializeHelper.h +++ b/pvDataApp/misc/serializeHelper.h @@ -18,10 +18,12 @@ #include #include +#include + namespace epics { namespace pvData { - class SerializeHelper : public NoDefaultMethods { + class epicsShareClass SerializeHelper : public NoDefaultMethods { public: /** diff --git a/pvDataApp/misc/sharedVector.h b/pvDataApp/misc/sharedVector.h index 1a66986..b6ce6a8 100644 --- a/pvDataApp/misc/sharedVector.h +++ b/pvDataApp/misc/sharedVector.h @@ -1,3 +1,9 @@ +/* sharedVector.h */ +/** + * Copyright - See the COPYRIGHT that is included with this distribution. + * EPICS pvData is distributed subject to a Software License Agreement found + * in file LICENSE that is included with this distribution. + */ #ifndef SHAREDVECTOR_H #define SHAREDVECTOR_H diff --git a/pvDataApp/misc/status.cpp b/pvDataApp/misc/status.cpp index 2ddc4fe..e001533 100644 --- a/pvDataApp/misc/status.cpp +++ b/pvDataApp/misc/status.cpp @@ -7,9 +7,10 @@ /** * @author mrk */ -#include +#define epicsExportSharedSymbols #include #include +#include namespace epics { namespace pvData { diff --git a/pvDataApp/misc/status.h b/pvDataApp/misc/status.h index 61e2bed..8e3bfaf 100644 --- a/pvDataApp/misc/status.h +++ b/pvDataApp/misc/status.h @@ -14,13 +14,15 @@ #include #include +#include + namespace epics { namespace pvData { /** * Status. * @author mse */ - class Status : public epics::pvData::Serializable { + class epicsShareClass Status : public epics::pvData::Serializable { public: POINTER_DEFINITIONS(Status); /** diff --git a/pvDataApp/misc/thread.h b/pvDataApp/misc/thread.h index 2bfaf28..fa15a06 100644 --- a/pvDataApp/misc/thread.h +++ b/pvDataApp/misc/thread.h @@ -9,11 +9,15 @@ */ #ifndef THREAD_H #define THREAD_H + #include + +#include + #include #include -#include +#include namespace epics { namespace pvData { @@ -33,7 +37,7 @@ typedef std::tr1::shared_ptr EpicsThreadPtr; typedef epicsThreadRunable Runnable; -class Thread : public epicsThread, private NoDefaultMethods { +class epicsShareClass Thread : public epicsThread, private NoDefaultMethods { public: Thread(String name, diff --git a/pvDataApp/misc/timeFunction.cpp b/pvDataApp/misc/timeFunction.cpp index 02e2bdf..d821429 100644 --- a/pvDataApp/misc/timeFunction.cpp +++ b/pvDataApp/misc/timeFunction.cpp @@ -13,6 +13,7 @@ #include #include +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/misc/timeFunction.h b/pvDataApp/misc/timeFunction.h index 0e32d57..a797142 100644 --- a/pvDataApp/misc/timeFunction.h +++ b/pvDataApp/misc/timeFunction.h @@ -9,8 +9,11 @@ */ #ifndef TIMEFUNCTION_H #define TIMEFUNCTION_H + #include +#include + namespace epics { namespace pvData { class TimeFunctionRequester; @@ -18,7 +21,7 @@ class TimeFunction; typedef std::tr1::shared_ptr TimeFunctionRequesterPtr; typedef std::tr1::shared_ptr TimeFunctionPtr; -class TimeFunctionRequester { +class epicsShareClass TimeFunctionRequester { public: POINTER_DEFINITIONS(TimeFunctionRequester); virtual ~TimeFunctionRequester(){} @@ -26,7 +29,7 @@ public: }; -class TimeFunction { +class epicsShareClass TimeFunction { public: POINTER_DEFINITIONS(TimeFunction); TimeFunction(TimeFunctionRequesterPtr const & requester); diff --git a/pvDataApp/misc/timer.cpp b/pvDataApp/misc/timer.cpp index 23a2315..66470a4 100644 --- a/pvDataApp/misc/timer.cpp +++ b/pvDataApp/misc/timer.cpp @@ -14,8 +14,9 @@ #include #include -#include +#define epicsExportSharedSymbols #include +#include namespace epics { namespace pvData { diff --git a/pvDataApp/misc/timer.h b/pvDataApp/misc/timer.h index d8996a1..25f486a 100644 --- a/pvDataApp/misc/timer.h +++ b/pvDataApp/misc/timer.h @@ -23,6 +23,8 @@ #include #include +#include + namespace epics { namespace pvData { class TimerCallback; @@ -30,7 +32,7 @@ class Timer; typedef std::tr1::shared_ptr TimerCallbackPtr; typedef std::tr1::shared_ptr TimerPtr; -class TimerCallback { +class epicsShareClass TimerCallback { public: POINTER_DEFINITIONS(TimerCallback); TimerCallback(); @@ -45,7 +47,7 @@ private: friend class Timer; }; -class Timer : public Runnable { +class epicsShareClass Timer : public Runnable { public: POINTER_DEFINITIONS(Timer); Timer(String threadName, ThreadPriority priority); diff --git a/pvDataApp/monitor/monitor.h b/pvDataApp/monitor/monitor.h index e0b2a38..28be481 100644 --- a/pvDataApp/monitor/monitor.h +++ b/pvDataApp/monitor/monitor.h @@ -16,6 +16,8 @@ #include #include +#include + namespace epics { namespace pvData { class MonitorElement; @@ -30,7 +32,7 @@ typedef std::tr1::shared_ptr MonitorPtr; * Class instance representing monitor element. * @author mrk */ -class MonitorElement { +class epicsShareClass MonitorElement { public: POINTER_DEFINITIONS(MonitorElement); MonitorElement(){} @@ -48,7 +50,7 @@ class MonitorElement { * Interface for Monitor. * @author mrk */ -class Monitor : public Destroyable{ +class epicsShareClass Monitor : public Destroyable{ public: POINTER_DEFINITIONS(Monitor); virtual ~Monitor(){} @@ -80,7 +82,7 @@ class Monitor : public Destroyable{ * Requester for ChannelMonitor. * @author mrk */ -class MonitorRequester : public virtual Requester { +class epicsShareClass MonitorRequester : public virtual Requester { public: POINTER_DEFINITIONS(MonitorRequester); virtual ~MonitorRequester(){} diff --git a/pvDataApp/property/alarm.cpp b/pvDataApp/property/alarm.cpp index e27939d..44a072a 100644 --- a/pvDataApp/property/alarm.cpp +++ b/pvDataApp/property/alarm.cpp @@ -9,13 +9,15 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include #include #include #include -namespace epics { namespace pvData { +namespace epics { namespace pvData { AlarmSeverity AlarmSeverityFunc::getSeverity(int value) { @@ -34,7 +36,7 @@ AlarmSeverity AlarmSeverityFunc::getSeverity(int value) StringArrayPtr AlarmSeverityFunc::getSeverityNames() { - static size_t severityCount = 5; + static size_t severityCount = 5; static StringArrayPtr severityNames; static Mutex mutex; Lock xx(mutex); @@ -82,7 +84,7 @@ AlarmStatus AlarmStatusFunc::getStatus(int value) StringArrayPtr AlarmStatusFunc::getStatusNames() { - static size_t statusCount = 8; + static size_t statusCount = 8; static StringArrayPtr statusNames; static Mutex mutex; Lock xx(mutex); diff --git a/pvDataApp/property/alarm.h b/pvDataApp/property/alarm.h index 086d322..0a9ed0e 100644 --- a/pvDataApp/property/alarm.h +++ b/pvDataApp/property/alarm.h @@ -7,10 +7,15 @@ /** * @author mrk */ -#include -#include #ifndef ALARM_H #define ALARM_H + +#include + +#include + +#include + namespace epics { namespace pvData { enum AlarmSeverity { @@ -23,21 +28,19 @@ enum AlarmStatus { }; -extern const size_t severityCount; -class AlarmSeverityFunc { +class epicsShareClass AlarmSeverityFunc { public: static AlarmSeverity getSeverity(int value); static StringArrayPtr getSeverityNames(); }; -extern const size_t statusCount; -class AlarmStatusFunc { +class epicsShareClass AlarmStatusFunc { public: static AlarmStatus getStatus(int value); static StringArrayPtr getStatusNames(); }; -class Alarm { +class epicsShareClass Alarm { public: Alarm() : severity(0),status(0), message(String("")) {} //default constructors and destructor are OK diff --git a/pvDataApp/property/control.h b/pvDataApp/property/control.h index 1a5a152..2ffdccb 100644 --- a/pvDataApp/property/control.h +++ b/pvDataApp/property/control.h @@ -9,9 +9,12 @@ */ #ifndef CONTROL_H #define CONTROL_H + +#include + namespace epics { namespace pvData { -class Control { +class epicsShareClass Control { public: Control() : low(0.0), high(0.0) {} //default constructors and destructor are OK diff --git a/pvDataApp/property/display.h b/pvDataApp/property/display.h index 0472aca..312803e 100644 --- a/pvDataApp/property/display.h +++ b/pvDataApp/property/display.h @@ -7,14 +7,19 @@ /** * @author mrk */ -#include -#include -#include #ifndef DISPLAY_H #define DISPLAY_H + +#include + +#include +#include + +#include + namespace epics { namespace pvData { -class Display { +class epicsShareClass Display { public: Display() : description(String("")),format(String("")),units(String("")), diff --git a/pvDataApp/property/pvAlarm.cpp b/pvDataApp/property/pvAlarm.cpp index bedd134..001fb44 100644 --- a/pvDataApp/property/pvAlarm.cpp +++ b/pvDataApp/property/pvAlarm.cpp @@ -9,10 +9,13 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include #include #include + namespace epics { namespace pvData { using std::tr1::static_pointer_cast; diff --git a/pvDataApp/property/pvAlarm.h b/pvDataApp/property/pvAlarm.h index b9c5127..42641bb 100644 --- a/pvDataApp/property/pvAlarm.h +++ b/pvDataApp/property/pvAlarm.h @@ -9,14 +9,18 @@ */ #ifndef PVALARM_H #define PVALARM_H + #include + #include #include #include +#include + namespace epics { namespace pvData { -class PVAlarm { +class epicsShareClass PVAlarm { public: PVAlarm() {} //default constructors and destructor are OK diff --git a/pvDataApp/property/pvControl.cpp b/pvDataApp/property/pvControl.cpp index 333632c..8f761ff 100644 --- a/pvDataApp/property/pvControl.cpp +++ b/pvDataApp/property/pvControl.cpp @@ -9,10 +9,13 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include #include #include + namespace epics { namespace pvData { using std::tr1::static_pointer_cast; diff --git a/pvDataApp/property/pvControl.h b/pvDataApp/property/pvControl.h index 9a0ba19..bcb2cc3 100644 --- a/pvDataApp/property/pvControl.h +++ b/pvDataApp/property/pvControl.h @@ -7,13 +7,17 @@ /** * @author mrk */ -#include -#include #ifndef PVCONTROL_H #define PVCONTROL_H + +#include +#include + +#include + namespace epics { namespace pvData { -class PVControl { +class epicsShareClass PVControl { public: PVControl(){} //default constructors and destructor are OK diff --git a/pvDataApp/property/pvDisplay.cpp b/pvDataApp/property/pvDisplay.cpp index c1cc2f0..f7e6887 100644 --- a/pvDataApp/property/pvDisplay.cpp +++ b/pvDataApp/property/pvDisplay.cpp @@ -9,10 +9,13 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include #include #include + namespace epics { namespace pvData { using std::tr1::static_pointer_cast; diff --git a/pvDataApp/property/pvDisplay.h b/pvDataApp/property/pvDisplay.h index 5767e02..2b299c0 100644 --- a/pvDataApp/property/pvDisplay.h +++ b/pvDataApp/property/pvDisplay.h @@ -7,15 +7,20 @@ /** * @author mrk */ +#ifndef PVDISPLAY_H +#define PVDISPLAY_H + #include + #include #include #include -#ifndef PVDISPLAY_H -#define PVDISPLAY_H + +#include + namespace epics { namespace pvData { -class PVDisplay { +class epicsShareClass PVDisplay { public: PVDisplay() {} //default constructors and destructor are OK diff --git a/pvDataApp/property/pvEnumerated.cpp b/pvDataApp/property/pvEnumerated.cpp index 77f24d9..3f069f7 100644 --- a/pvDataApp/property/pvEnumerated.cpp +++ b/pvDataApp/property/pvEnumerated.cpp @@ -9,10 +9,13 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include #include #include + namespace epics { namespace pvData { using std::tr1::static_pointer_cast; diff --git a/pvDataApp/property/pvEnumerated.h b/pvDataApp/property/pvEnumerated.h index 7887908..30d020b 100644 --- a/pvDataApp/property/pvEnumerated.h +++ b/pvDataApp/property/pvEnumerated.h @@ -7,14 +7,19 @@ /** * @author mrk */ -#include -#include -#include #ifndef PVENUMERATED_H #define PVENUMERATED_H + +#include + +#include +#include + +#include + namespace epics { namespace pvData { -class PVEnumerated { +class epicsShareClass PVEnumerated { public: PVEnumerated() {} //default constructors and destructor are OK diff --git a/pvDataApp/property/pvTimeStamp.cpp b/pvDataApp/property/pvTimeStamp.cpp index 174c060..daf2352 100644 --- a/pvDataApp/property/pvTimeStamp.cpp +++ b/pvDataApp/property/pvTimeStamp.cpp @@ -9,10 +9,13 @@ */ #include #include + +#define epicsExportSharedSymbols #include #include #include #include + namespace epics { namespace pvData { using std::tr1::static_pointer_cast; diff --git a/pvDataApp/property/pvTimeStamp.h b/pvDataApp/property/pvTimeStamp.h index 5d6f73b..500cbe2 100644 --- a/pvDataApp/property/pvTimeStamp.h +++ b/pvDataApp/property/pvTimeStamp.h @@ -7,16 +7,21 @@ /** * @author mrk */ -#include -#include -#include -#include -#include #ifndef PVTIMESTAMP_H #define PVTIMESTAMP_H + +#include +#include + +#include +#include +#include + +#include + namespace epics { namespace pvData { -class PVTimeStamp { +class epicsShareClass PVTimeStamp { public: PVTimeStamp(){} //default constructors and destructor are OK diff --git a/pvDataApp/property/timeStamp.cpp b/pvDataApp/property/timeStamp.cpp index b62af29..6482ea1 100644 --- a/pvDataApp/property/timeStamp.cpp +++ b/pvDataApp/property/timeStamp.cpp @@ -14,6 +14,8 @@ #include #include + +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/property/timeStamp.h b/pvDataApp/property/timeStamp.h index 1bcd25f..3c54bc0 100644 --- a/pvDataApp/property/timeStamp.h +++ b/pvDataApp/property/timeStamp.h @@ -9,18 +9,22 @@ */ #ifndef TIMESTAMP_H #define TIMESTAMP_H + #include -#include "epicsTime.h" +#include + #include +#include + namespace epics { namespace pvData { -extern int32 milliSecPerSec; -extern int32 microSecPerSec; -extern int32 nanoSecPerSec; -extern int64 posixEpochAtEpicsEpoch; +epicsShareExtern int32 milliSecPerSec; +epicsShareExtern int32 microSecPerSec; +epicsShareExtern int32 nanoSecPerSec; +epicsShareExtern int64 posixEpochAtEpicsEpoch; -class TimeStamp { +class epicsShareClass TimeStamp { public: TimeStamp() :secondsPastEpoch(0), nanoSeconds(0), userTag(0) {} diff --git a/pvDataApp/pv/convert.h b/pvDataApp/pv/convert.h index 393df1f..45882db 100644 --- a/pvDataApp/pv/convert.h +++ b/pvDataApp/pv/convert.h @@ -10,28 +10,31 @@ */ #ifndef CONVERT_H #define CONVERT_H + #include #include +#include #include #include -#include + +#include namespace epics { namespace pvData { -bool operator==(const PVField&, const PVField&); +bool epicsShareExtern operator==(const PVField&, const PVField&); static inline bool operator!=(const PVField& a, const PVField& b) {return !(a==b);} -bool operator==(const Field&, const Field&); -bool operator==(const Scalar&, const Scalar&); -bool operator==(const ScalarArray&, const ScalarArray&); -bool operator==(const Structure&, const Structure&); -bool operator==(const StructureArray&, const StructureArray&); -bool operator==(const Union&, const Union&); -bool operator==(const UnionArray&, const UnionArray&); +bool epicsShareExtern operator==(const Field&, const Field&); +bool epicsShareExtern operator==(const Scalar&, const Scalar&); +bool epicsShareExtern operator==(const ScalarArray&, const ScalarArray&); +bool epicsShareExtern operator==(const Structure&, const Structure&); +bool epicsShareExtern operator==(const StructureArray&, const StructureArray&); +bool epicsShareExtern operator==(const Union&, const Union&); +bool epicsShareExtern operator==(const UnionArray&, const UnionArray&); static inline bool operator!=(const Field& a, const Field& b) {return !(a==b);} @@ -74,7 +77,7 @@ static inline bool operator!=(const UnionArray& a, const UnionArray& b) class Convert; typedef std::tr1::shared_ptr ConvertPtr; -class Convert { +class epicsShareClass Convert { public: static ConvertPtr getConvert(); /** diff --git a/pvDataApp/pv/pvData.h b/pvDataApp/pv/pvData.h index 2bd1f88..44bed58 100644 --- a/pvDataApp/pv/pvData.h +++ b/pvDataApp/pv/pvData.h @@ -25,11 +25,14 @@ #include #include #include + #include #include #include #include +#include + #if defined(__vxworks) && !defined(_WRS_VXWORKS_MAJOR) typedef class std::ios std::ios_base; #endif @@ -52,7 +55,8 @@ inline long& indent_value(std::ios_base& ios) return ios.iword(indent_index); } -std::ostream& operator<<(std::ostream& os, indent_level const& indent); +epicsShareExtern std::ostream& operator<<(std::ostream& os, indent_level const& indent); + struct indent_scope { long saved_level; @@ -76,7 +80,7 @@ struct indent { }; -std::ostream& operator<<(std::ostream& os, indent const&); +epicsShareExtern std::ostream& operator<<(std::ostream& os, indent const&); struct array_at { @@ -195,7 +199,7 @@ typedef std::tr1::shared_ptr PVDataCreatePtr; * Each item is stored as a PVScalar. * A (key,value) is provided for accessing the items where the key is a String. */ -class PVAuxInfo : private NoDefaultMethods { +class epicsShareClass PVAuxInfo : private NoDefaultMethods { public: typedef std::map PVInfoMap; typedef std::map::iterator PVInfoIter; @@ -254,7 +258,7 @@ private: /** * This class is implemented by code that calls setPostHander */ -class PostHandler +class epicsShareClass PostHandler { public: POINTER_DEFINITIONS(PostHandler); @@ -272,7 +276,7 @@ public: * PVField is the base class for each PVData field. * Each PVData field has an interface that extends PVField. */ -class PVField +class epicsShareClass PVField : virtual public Serializable, public std::tr1::enable_shared_from_this { @@ -424,12 +428,12 @@ private: friend class PVStructure; }; -std::ostream& operator<<(std::ostream& o, const PVField& f); +epicsShareExtern std::ostream& operator<<(std::ostream& o, const PVField& f); /** * PVScalar is the base class for each scalar field. */ -class PVScalar : public PVField { +class epicsShareClass PVScalar : public PVField { // friend our child class(s) so that it // can call protected methods of other // PVScalar instances. @@ -608,7 +612,7 @@ typedef std::tr1::shared_ptr PVDoublePtr; /** * PVString is special case, since it implements SerializableArray */ -class PVString : public PVScalarValue, SerializableArray { +class epicsShareClass PVString : public PVScalarValue, SerializableArray { public: /** * Destructor @@ -624,7 +628,7 @@ typedef std::tr1::shared_ptr PVStringPtr; /** * PVArray is the base class for all array types, i.e. the scalarArray types and structureArray. */ -class PVArray : public PVField, public SerializableArray { +class epicsShareClass PVArray : public PVField, public SerializableArray { public: POINTER_DEFINITIONS(PVArray); /** @@ -676,7 +680,7 @@ private: friend class PVDataCreate; }; -std::ostream& operator<<(format::array_at_internal const& manip, const PVArray& array); +epicsShareExtern std::ostream& operator<<(format::array_at_internal const& manip, const PVArray& array); /** * Class provided by caller of get @@ -707,7 +711,7 @@ public: /** * Base class for a scalarArray. */ -class PVScalarArray : public PVArray { +class epicsShareClass PVScalarArray : public PVArray { public: POINTER_DEFINITIONS(PVScalarArray); /** @@ -783,7 +787,7 @@ private: }; -class PVStructure : public PVField, public BitSetSerializable +class epicsShareClass PVStructure : public PVField, public BitSetSerializable { public: POINTER_DEFINITIONS(PVStructure); @@ -1408,7 +1412,7 @@ typedef PVArrayData StructureArrayData; * Data class for a structureArray */ template<> -class PVValueArray : public detail::PVVectorStorage +class epicsShareClass PVValueArray : public detail::PVVectorStorage { typedef detail::PVVectorStorage base_t; public: @@ -1506,7 +1510,7 @@ typedef PVArrayData UnionArrayData; * Data class for a unionArray */ template<> -class PVValueArray : public detail::PVVectorStorage +class epicsShareClass PVValueArray : public detail::PVVectorStorage { typedef detail::PVVectorStorage base_t; public: @@ -1649,7 +1653,7 @@ typedef std::tr1::shared_ptr PVStringArrayPtr; /** * This is a singlton class for creating data instances. */ -class PVDataCreate { +class epicsShareClass PVDataCreate { public: static PVDataCreatePtr getPVDataCreate(); /** @@ -1794,7 +1798,7 @@ private: * @param The PVDataCreate factory. */ -extern PVDataCreatePtr getPVDataCreate(); +epicsShareExtern PVDataCreatePtr getPVDataCreate(); #undef USAGE_DEPRECATED #undef USAGE_ERROR diff --git a/pvDataApp/pv/pvIntrospect.h b/pvDataApp/pv/pvIntrospect.h index b958390..b33df78 100644 --- a/pvDataApp/pv/pvIntrospect.h +++ b/pvDataApp/pv/pvIntrospect.h @@ -9,6 +9,7 @@ */ #ifndef PVINTROSPECT_H #define PVINTROSPECT_H + #include #include @@ -17,6 +18,8 @@ #include #include +#include + namespace epics { namespace pvData { class Field; @@ -99,13 +102,13 @@ namespace TypeFunc { * @param type The type. * @return The name for the type. */ - const char* name(Type type); + epicsShareExtern const char* name(Type type); /** * Convert the type to a string and add it to builder. * @param builder The string builder. * @param type The type. */ - void toString(StringBuilder builder,const Type type); + epicsShareExtern void toString(StringBuilder builder,const Type type); }; /** @@ -173,53 +176,53 @@ namespace ScalarTypeFunc { * @param scalarType The type. * @return (false,true) if the scalarType is an integer. */ - bool isInteger(ScalarType scalarType); + epicsShareExtern bool isInteger(ScalarType scalarType); /** * Is the type an unsigned integer, i. e. is it one of ubyte,...ulong * @param scalarType The type. * @return (false,true) if the scalarType is an integer. */ - bool isUInteger(ScalarType scalarType); + epicsShareExtern bool isUInteger(ScalarType scalarType); /** * Is the type numeric, i. e. is it one of byte,...,double * @param scalarType The type. * @return (false,true) if the scalarType is a numeric */ - bool isNumeric(ScalarType scalarType); + epicsShareExtern bool isNumeric(ScalarType scalarType); /** * Is the type primitive, i. e. not string * @param scalarType The type. * @return (false,true) if the scalarType is primitive. */ - bool isPrimitive(ScalarType scalarType); + epicsShareExtern bool isPrimitive(ScalarType scalarType); /** * Get the scalarType for value. * @param value The name of the scalar type. * @return The scalarType. * An exception is thrown if the name is not the name of a scalar type. */ - ScalarType getScalarType(String const &value); + epicsShareExtern ScalarType getScalarType(String const &value); /** * Get a name for the scalarType. * @param scalarType The type. * @return The name for the scalarType. */ - const char* name(ScalarType scalarType); + epicsShareExtern const char* name(ScalarType scalarType); /** * Convert the scalarType to a string and add it to builder. * @param builder The string builder. * @param scalarType The type. */ - void toString(StringBuilder builder,ScalarType scalarType); + epicsShareExtern void toString(StringBuilder builder,ScalarType scalarType); //! gives sizeof(T) where T depends on the scalar type id. - size_t elementSize(ScalarType id); + epicsShareExtern size_t elementSize(ScalarType id); }; /** * This class implements introspection object for field. */ -class Field : +class epicsShareClass Field : virtual public Serializable, public std::tr1::enable_shared_from_this { public: @@ -272,7 +275,7 @@ private: /** * This class implements introspection object for Scalar. */ -class Scalar : public Field{ +class epicsShareClass Scalar : public Field{ public: POINTER_DEFINITIONS(Scalar); /** @@ -314,7 +317,7 @@ private: /** * This class implements introspection object for field. */ -class ScalarArray : public Field{ +class epicsShareClass ScalarArray : public Field{ public: POINTER_DEFINITIONS(ScalarArray); typedef ScalarArray& reference; @@ -362,7 +365,7 @@ private: /** * This class implements introspection object for a structureArray */ -class StructureArray : public Field{ +class epicsShareClass StructureArray : public Field{ public: POINTER_DEFINITIONS(StructureArray); typedef StructureArray& reference; @@ -404,7 +407,7 @@ private: /** * This class implements introspection object for a unionArray */ -class UnionArray : public Field{ +class epicsShareClass UnionArray : public Field{ public: POINTER_DEFINITIONS(UnionArray); typedef UnionArray& reference; @@ -446,7 +449,7 @@ private: /** * This class implements introspection object for a structure. */ -class Structure : public Field { +class epicsShareClass Structure : public Field { public: POINTER_DEFINITIONS(Structure); @@ -536,7 +539,7 @@ private: /** * This class implements introspection object for a union. */ -class Union : public Field { +class epicsShareClass Union : public Field { public: POINTER_DEFINITIONS(Union); @@ -649,7 +652,7 @@ typedef std::tr1::shared_ptr FieldBuilderPtr; * An instance of this object must not be used concurrently (an object has a state). * @author mse */ -class FieldBuilder : +class epicsShareClass FieldBuilder : public std::tr1::enable_shared_from_this { public: @@ -781,7 +784,7 @@ private: }; -class FieldCreate { +class epicsShareClass FieldCreate { public: static FieldCreatePtr getFieldCreate(); /** @@ -908,7 +911,7 @@ private: * Get the single class that implemnents FieldCreate, * @param The fieldCreate factory. */ -extern FieldCreatePtr getFieldCreate(); +epicsShareExtern FieldCreatePtr getFieldCreate(); /** Define a compile time mapping from * type to enum value. diff --git a/pvDataApp/pv/pvSubArrayCopy.h b/pvDataApp/pv/pvSubArrayCopy.h index 8f62a26..4bbf107 100644 --- a/pvDataApp/pv/pvSubArrayCopy.h +++ b/pvDataApp/pv/pvSubArrayCopy.h @@ -10,8 +10,11 @@ */ #ifndef PVSUBARRAYCOPY_H #define PVSUBARRAYCOPY_H + #include +#include + namespace epics { namespace pvData { /** @brief Copy a subarray from one PVValueArray to another. @@ -38,7 +41,7 @@ void copy( * @param toOffset The offset in the destination * @param len The total number of elements to copy */ -void copy( +epicsShareExtern void copy( PVScalarArray & from, size_t fromOffset, PVScalarArray & to, @@ -54,7 +57,7 @@ void copy( * @param toOffset The offset in the destination * @param len The total number of elements to copy */ -void copy( +epicsShareExtern void copy( PVStructureArray & from, size_t fromOffset, PVStructureArray & to, @@ -70,7 +73,7 @@ void copy( * @param toOffset The offset in the destination * @param len The total number of elements to copy */ -void copy( +epicsShareExtern void copy( PVArray & from, size_t fromOffset, PVArray & to, diff --git a/pvDataApp/pv/standardField.h b/pvDataApp/pv/standardField.h index 9315d47..4cc7274 100644 --- a/pvDataApp/pv/standardField.h +++ b/pvDataApp/pv/standardField.h @@ -10,10 +10,14 @@ */ #ifndef STANDARDFIELD_H #define STANDARDFIELD_H + #include #include + #include +#include + namespace epics { namespace pvData { /** @@ -57,7 +61,7 @@ namespace epics { namespace pvData { class StandardField; typedef std::tr1::shared_ptr StandardFieldPtr; -class StandardField { +class epicsShareClass StandardField { public: static StandardFieldPtr getStandardField(); ~StandardField(); @@ -124,7 +128,7 @@ private: friend StandardFieldPtr getStandardField(); }; -extern StandardFieldPtr getStandardField(); +epicsShareExtern StandardFieldPtr getStandardField(); }} #endif /* STANDARDFIELD_H */ diff --git a/pvDataApp/pv/standardPVField.h b/pvDataApp/pv/standardPVField.h index ac34d8a..ca93465 100644 --- a/pvDataApp/pv/standardPVField.h +++ b/pvDataApp/pv/standardPVField.h @@ -9,12 +9,16 @@ */ #ifndef STANDARDPVFIELD_H #define STANDARDPVFIELD_H + #include #include + #include #include #include +#include + namespace epics { namespace pvData { /** * StandardPVField is a class or creating standard data fields. @@ -31,7 +35,7 @@ namespace epics { namespace pvData { class StandardPVField; typedef std::tr1::shared_ptr StandardPVFieldPtr; -class StandardPVField : private NoDefaultMethods { +class epicsShareClass StandardPVField : private NoDefaultMethods { public: static StandardPVFieldPtr getStandardPVField(); ~StandardPVField(); @@ -48,7 +52,7 @@ private: String notImplemented; }; -extern StandardPVFieldPtr getStandardPVField(); +epicsShareExtern StandardPVFieldPtr getStandardPVField(); }} #endif /* STANDARDPVFIELD_H */ diff --git a/pvDataApp/pvMisc/bitSetUtil.cpp b/pvDataApp/pvMisc/bitSetUtil.cpp index b27075c..c3753a9 100644 --- a/pvDataApp/pvMisc/bitSetUtil.cpp +++ b/pvDataApp/pvMisc/bitSetUtil.cpp @@ -7,6 +7,7 @@ /** * @author mrk */ +#define epicsExportSharedSymbols #include #include #include diff --git a/pvDataApp/pvMisc/bitSetUtil.h b/pvDataApp/pvMisc/bitSetUtil.h index add517a..046a487 100644 --- a/pvDataApp/pvMisc/bitSetUtil.h +++ b/pvDataApp/pvMisc/bitSetUtil.h @@ -9,13 +9,16 @@ */ #ifndef BITSETUTIL_H #define BITSETUTIL_H + #include #include #include +#include + namespace epics { namespace pvData { -class BitSetUtil : private NoDefaultMethods { +class epicsShareClass BitSetUtil : private NoDefaultMethods { public: static bool compress(BitSetPtr const &bitSet,PVStructurePtr const &pvStructure); }; diff --git a/testApp/misc/testSerialization.cpp b/testApp/misc/testSerialization.cpp index 71980ff..50e8b6c 100644 --- a/testApp/misc/testSerialization.cpp +++ b/testApp/misc/testSerialization.cpp @@ -67,7 +67,7 @@ public: buffer->align(alignment); } - virtual bool directSerialize(ByteBuffer */*existingBuffer*/, const char* /*toSerialize*/, + virtual bool directSerialize(ByteBuffer* /*existingBuffer*/, const char* /*toSerialize*/, std::size_t /*elementCount*/, std::size_t /*elementSize*/) { return false; @@ -95,7 +95,7 @@ public: buffer->align(alignment); } - virtual bool directDeserialize(ByteBuffer */*existingBuffer*/, char* /*deserializeTo*/, + virtual bool directDeserialize(ByteBuffer* /*existingBuffer*/, char* /*deserializeTo*/, std::size_t /*elementCount*/, std::size_t /*elementSize*/) { return false; diff --git a/testApp/property/testProperty.cpp b/testApp/property/testProperty.cpp index 4d1dc59..3a8450c 100644 --- a/testApp/property/testProperty.cpp +++ b/testApp/property/testProperty.cpp @@ -48,7 +48,7 @@ static String allProperties("alarm,timeStamp,display,control"); static PVStructurePtr doubleRecord; static PVStructurePtr enumeratedRecord; -static void createRecords(FILE * fd,FILE */*auxfd*/) +static void createRecords(FILE * fd,FILE* /*auxfd*/) { doubleRecord = standardPVField->scalar(pvDouble,allProperties); if(debug) { @@ -70,7 +70,7 @@ static void createRecords(FILE * fd,FILE */*auxfd*/) } } -static void printRecords(FILE * fd,FILE */*auxfd*/) +static void printRecords(FILE * fd,FILE* /*auxfd*/) { fprintf(fd,"doubleRecord\n"); builder.clear(); @@ -82,7 +82,7 @@ static void printRecords(FILE * fd,FILE */*auxfd*/) fprintf(fd,"%s\n",builder.c_str()); } -static void testAlarm(FILE * fd,FILE */*auxfd*/) +static void testAlarm(FILE * fd,FILE* /*auxfd*/) { if(debug) fprintf(fd,"testAlarm\n"); Alarm alarm; @@ -155,7 +155,7 @@ static void testTimeStamp(FILE * fd,FILE *auxfd) fprintf(fd,"testTimeStamp PASSED\n"); } -static void testControl(FILE * fd,FILE */*auxfd*/) +static void testControl(FILE * fd,FILE* /*auxfd*/) { if(debug) fprintf(fd,"testControl\n"); Control control; @@ -182,7 +182,7 @@ static void testControl(FILE * fd,FILE */*auxfd*/) fprintf(fd,"testControl PASSED\n"); } -static void testDisplay(FILE * fd,FILE */*auxfd*/) +static void testDisplay(FILE * fd,FILE* /*auxfd*/) { if(debug) fprintf(fd,"testDisplay\n"); Display display; @@ -215,7 +215,7 @@ static void testDisplay(FILE * fd,FILE */*auxfd*/) fprintf(fd,"testDisplay PASSED\n"); } -static void testEnumerated(FILE * fd,FILE */*auxfd*/) +static void testEnumerated(FILE * fd,FILE* /*auxfd*/) { if(debug) fprintf(fd,"testEnumerated\n"); PVEnumerated pvEnumerated;