[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdevplatform/plugins/teamwork
From: David Nolden <david.nolden.kde () art-master ! de>
Date: 2008-05-31 20:37:01
Message-ID: 1212266221.017302.15781.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 814978 by zwabel:
Add a lot of export macros, and remove 2 BOOST_CLASS_EXPORT_GUID macro uses. Due to the removed macros, \
teamwork doesn't crash anymore on startup. Now let's see whether it works.
M +1 -1 lib/dynamictext/dynamictext.cpp
M +1 -1 lib/dynamictext/dynamictext.h
M +4 -3 lib/dynamictext/flexibletext.h
M +1 -1 lib/dynamictext/sumtree.h
M +3 -2 lib/network/basicsession.h
M +3 -2 lib/network/handler.h
M +2 -1 lib/network/messagesendhelper.h
M +1 -1 lib/network/messagetypeset.h
M +6 -5 lib/network/messagetypesetinternal.h
M +1 -1 lib/network/multisession.h
M +2 -1 lib/network/mutexinterface.h
M +5 -4 lib/network/safesharedptr.h
M +5 -4 lib/network/serialization.h
M +5 -4 lib/network/sharedptr.h
M +1 -1 qdynamictext.cpp
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/dynamictext/dynamictext.cpp #814977:814978
@@ -917,7 +917,7 @@
void DynamicText::notifyStateChanged() {}
-BOOST_CLASS_EXPORT_GUID( DynamicText, "DynamicText" )
+//BOOST_CLASS_EXPORT_GUID( DynamicText, "DynamicText" )
template bool Replacement::unApply( DynamicText::Text& text, const OffsetMap& outerOffset, OffsetMap& \
contextOffset ); template bool Replacement::apply( DynamicText::Text& text, const OffsetMap& \
outerOffset, OffsetMap& contextOffset );
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/dynamictext/dynamictext.h #814977:814978
@@ -32,7 +32,7 @@
#define INVALID_POSITION -1000000
-struct OffsetRequest {
+struct DYNAMICTEXT_EXPORT OffsetRequest {
VectorTimestamp from;
VectorTimestamp to;
OffsetRequest( const VectorTimestamp& f, const VectorTimestamp& t ) : from(f), to(t) {
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/dynamictext/flexibletext.h #814977:814978
@@ -25,11 +25,12 @@
#include "sumtree.h"
#include "flexibletextnotifier.h"
+#include "dynamictextexport.h"
namespace SumTree {
template<class Tp>
-class TemporaryExchange {
+class DYNAMICTEXT_EXPORT TemporaryExchange {
public:
TemporaryExchange( Tp& target, Tp newValue ) : target_(target), oldValue_(target) {
target_ = newValue;
@@ -44,7 +45,7 @@
///This is just a little helper that autmatically deleted unremoved members of a string-list on \
exceptions etc. ///If they should be used on elsewhere, they must be removed from this list.
template <class StringList>
-struct ManagedStringList {
+struct DYNAMICTEXT_EXPORT ManagedStringList {
ManagedStringList( const StringList& rhs ) : list( rhs ) {}
void delete_front() {
@@ -72,7 +73,7 @@
* */
template <class String, class Char = char, Char lineBreak = '\n'>
-class FlexibleText {
+class DYNAMICTEXT_EXPORT FlexibleText {
typedef std::deque<String*> StringVector;
public:
typedef std::list<String*> StringList;
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/dynamictext/sumtree.h #814977:814978
@@ -31,7 +31,7 @@
///A pair that contains an index and the sum of all values before that index
-struct IndexAndSum {
+struct DYNAMICTEXT_EXPORT IndexAndSum {
int index;
int sum;
};
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/basicsession.h #814977:814978
@@ -23,10 +23,11 @@
#include "logger.h"
#include "sessioninterface.h"
#include <map>
+#include "networkexport.h"
namespace Teamwork {
- class SessionReplyManager {
+ class NETWORK_EXPORT SessionReplyManager {
typedef std::map<uint, MessagePointer> WaitingMap;
MutexInterfaceImpl* selfMutex_;
WaitingMap waitingMessages_; ///here, all messages that wait for a reply are stored, mapped to their \
unique-ids. @@ -42,7 +43,7 @@
virtual ~SessionReplyManager();
};
-class BasicTCPSession : protected ost::TCPSession, /*public virtual SafeShared,*/ public \
SessionInterface, public SessionReplyManager { +class NETWORK_EXPORT BasicTCPSession : protected \
ost::TCPSession, /*public virtual SafeShared,*/ public SessionInterface, public SessionReplyManager { \
public: using Thread::setName;
using Thread::getName;
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/handler.h #814977:814978
@@ -16,9 +16,10 @@
#include "networkfwd.h"
#include "safesharedptr.h"
+#include "networkexport.h"
namespace Teamwork {
-class HandlerInterface : public SafeShared {
+class NETWORK_EXPORT HandlerInterface : public SafeShared {
public:
virtual ~HandlerInterface() {}
/**When the handler is multithreaded, this function must be thread-safe by just queueing the Message \
to a secure list and processing later. @@ -27,7 +28,7 @@
};
template <class Target>
-struct HandlerProxy : public HandlerInterface {
+struct NETWORK_EXPORT HandlerProxy : public HandlerInterface {
WeakSafeSharedPtr<Target> handler_;
HandlerProxy( const SafeSharedPtr<Target>& targ ) : handler_( targ ) {}
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/messagesendhelper.h #814977:814978
@@ -19,12 +19,13 @@
#include "networkfwd.h"
#include "sessioninterface.h"
#include "messageinterface.h"
+#include "networkexport.h"
namespace Teamwork {
class MessageTypeSet;
///A little helper-class that allows creating types with less writing(can be imported into any class by \
inheritance)
-class MessageSendHelper {
+class NETWORK_EXPORT MessageSendHelper {
MessageTypeSet& types_;
public:
MessageSendHelper( MessageTypeSet& types = globalMessageTypeSet() ) : types_( types ) {}
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/messagetypeset.h #814977:814978
@@ -230,7 +230,7 @@
///This message-type-set contains all messages that were registered by a call to REGISTER_MESSAGE, and \
may be used instead of the local type-sets, for simplicity. That way messages can be \
serialized/deserialized without the core-parts being aware that they exist.
-MessageTypeSet& globalMessageTypeSet();
+MessageTypeSet& NETWORK_EXPORT globalMessageTypeSet();
template <class MessageType>
class NETWORK_EXPORT RegisterMessageTypeInternal {
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/messagetypesetinternal.h #814977:814978
@@ -16,13 +16,14 @@
#include "statictree.h"
#include "messageinterface.h"
#include <string>
+#include "networkexport.h"
#define DISABLEWARNINGS
namespace Teamwork {
using namespace Tree;
class MessageInfo;
-struct MessageFactoryInterface {
+struct NETWORK_EXPORT MessageFactoryInterface {
virtual MessagePointer buildMessage( InArchive& from , const MessageInfo& inf ) = 0;
virtual std::string identify() = 0;
#ifdef DISABLEWARNINGS
@@ -32,7 +33,7 @@
;
template <class MessageType>
-struct MessageFactory : public MessageFactoryInterface {
+struct NETWORK_EXPORT MessageFactory : public MessageFactoryInterface {
virtual MessagePointer buildMessage( InArchive& from, const MessageInfo& inf ) {
return MessagePointer( new MessageType( from, inf ) );
}
@@ -47,21 +48,21 @@
;
template < class Type, class Target >
-struct RegisterAllTypes {
+struct NETWORK_EXPORT RegisterAllTypes {
static void reg( Target& targ ) {
targ.Error_Bad_Type_List();
};
};
template < class Type, class Parent, uchar preferredSubId, class Target >
-struct RegisterAllTypes< Chain< Type, Parent, preferredSubId >, Target > {
+struct NETWORK_EXPORT RegisterAllTypes< Chain< Type, Parent, preferredSubId >, Target > {
static void reg( Target& targ ) {
targ.template registerMessageType< Type, Parent > ( preferredSubId );
};
};
template < class Side1, class Side2, class Target >
-struct RegisterAllTypes< Binder< Side1, Side2 >, Target > {
+struct NETWORK_EXPORT RegisterAllTypes< Binder< Side1, Side2 >, Target > {
static void reg( Target& targ ) {
RegisterAllTypes< Side2, Target >::reg( targ );
RegisterAllTypes< Side1, Target >::reg( targ );
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/multisession.h #814977:814978
@@ -40,7 +40,7 @@
* It is created by Teamwork::Server and Teamwork::Client
* */
-class MultiSession : public BasicTCPSession {
+class NETWORK_EXPORT MultiSession : public BasicTCPSession {
bool incoming_;
typedef std::map<UserPointer, ForwardSessionPointer, UserPointer::ValueSmallerCompare> \
ForwardSessionMap; ForwardSessionMap forwardSessions_;
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/mutexinterface.h #814977:814978
@@ -14,8 +14,9 @@
#define MUTEXINTERFACE_H
#include <QMutex>
+#include "networkexport.h"
-class MutexInterfaceImpl {
+class NETWORK_EXPORT MutexInterfaceImpl {
mutable QMutex m_;
public:
MutexInterfaceImpl( const MutexInterfaceImpl& /*rhs*/ ) : m_(QMutex::Recursive) {
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/safesharedptr.h #814977:814978
@@ -21,6 +21,7 @@
#include "mutexinterface.h"
#include <boost/serialization/extended_type_info_typeid.hpp>
#include <boost/serialization/nvp.hpp>
+#include "networkexport.h"
#define MILLI_TO_NANO 1000000
#define SEC_TO_NANO 1000000000
@@ -37,7 +38,7 @@
* It can either be used with SafeSharedPtr to also control access to the function, or with SharedPtr
* to only do thread-safe reference-counting.
* */
-class SafeShared : public MutexInterfaceImpl {
+class NETWORK_EXPORT SafeShared : public MutexInterfaceImpl {
public:
/**
* Standard constructor. This will initialize the reference count
@@ -99,7 +100,7 @@
As long as this object exists, the data pointed to can be used exclusively. The data may also be 0 \
(invalid)! */ #ifndef USE_NEW_LOCKED
template <class Item>
-class LockedSharedPtr : protected SharedPtr<Item> {
+class NETWORK_EXPORT LockedSharedPtr : protected SharedPtr<Item> {
private:
void release() {
if ( *this )
@@ -213,7 +214,7 @@
};
#else
template <class Item>
-class LockedSharedPtr : protected SharedPtr<Item> {
+class NETWORK_EXPORT LockedSharedPtr : protected SharedPtr<Item> {
private:
void release() {
if ( *this )
@@ -333,7 +334,7 @@
const int SafeSharedLockTimeout = SEC_TO_NANO * 5;
template <class Item, class Serialization>
-class SafeSharedPtr : protected SharedPtr<Item, Serialization> {
+class NETWORK_EXPORT SafeSharedPtr : protected SharedPtr<Item, Serialization> {
public:
typedef SharedPtr<Item, Serialization> Precursor;
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/serialization.h #814977:814978
@@ -49,10 +49,11 @@
//#include <boost/serialization/vector.hpp>
#include <boost/serialization/level.hpp>
#include <vector>
+#include "networkexport.h"
namespace Teamwork {
- class TeamworkError : public std::exception {
+ class NETWORK_EXPORT TeamworkError : public std::exception {
std::string str_;
public:
TeamworkError( const std::string& str ) {
@@ -66,7 +67,7 @@
};
///This error may be thrown while serialization and it will only stop the message from being sent, it \
will not close the session.
- struct NonFatalSerializationError : public TeamworkError {
+ struct NETWORK_EXPORT NonFatalSerializationError : public TeamworkError {
NonFatalSerializationError( const std::string& str ) : TeamworkError( "non-fatal \
serialization-error: " + str ) {} }
;
@@ -77,12 +78,12 @@
*cases that behavior is not appropriate. Then this exception can be thrown
*while reserializing or rebuilding the message, to make clear that the
*message should be sent anyway. */
- struct CannotReserialize : public NonFatalSerializationError {
+ struct NETWORK_EXPORT CannotReserialize : public NonFatalSerializationError {
CannotReserialize() : NonFatalSerializationError( "the message cannot be serialized after being \
deserialized" ) {} }
;
- class StreamError : public TeamworkError {
+ class NETWORK_EXPORT StreamError : public TeamworkError {
public:
StreamError( const std::string& str ) : TeamworkError( "Stream-Error: " + str ) {}
}
--- trunk/KDE/kdevplatform/plugins/teamwork/lib/network/sharedptr.h #814977:814978
@@ -21,6 +21,7 @@
#include <boost/serialization/extended_type_info_typeid.hpp>
#include <boost/serialization/split_member.hpp>
+#include "networkexport.h"
/**
* Warning: Not thread-safe: use SafeShared for thread-safe reference-counting.
@@ -40,7 +41,7 @@
*
* @author Waldo Bastian <bastian@kde.org>
*/
-class Shared {
+class NETWORK_EXPORT Shared {
public:
/**
* Standard constructor. This will initialize the reference count
@@ -94,7 +95,7 @@
///NormaSerialization serializes the object in a primitive way by just calling the objects \
serialization-method.
-struct NormalSerialization {
+struct NETWORK_EXPORT NormalSerialization {
template <class Type, class Archive, class Target>
static void load( Target& t, Archive& arch, int /*version*/ ) {
bool b = false;
@@ -132,7 +133,7 @@
/**BoostSerialization relies on boost's pointer-serialization(Which includes tracking, versioning, \
etc.).
* Objects serialized this way must be registered to the boost serialization-system.
*/
-struct BoostSerialization {
+struct NETWORK_EXPORT BoostSerialization {
template <class Type, class Archive, class Target>
static void load( Target& t, Archive& arch, int /*version*/ ) {
bool b = false;
@@ -205,7 +206,7 @@
*/
template < class T, class Serialization = NormalSerialization >
-class SharedPtr {
+class NETWORK_EXPORT SharedPtr {
public:
friend class NormalSerialization;
/**
--- trunk/KDE/kdevplatform/plugins/teamwork/qdynamictext.cpp #814977:814978
@@ -34,7 +34,7 @@
return *this;
}
-BOOST_CLASS_EXPORT_GUID(QDynamicText, "QDynamicText")
+//BOOST_CLASS_EXPORT_GUID(QDynamicText, "QDynamicText")
#include "qdynamictext.moc"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic