From 5aa26565ca3bfd400b147778c8d19f09c72dccf2 Mon Sep 17 00:00:00 2001 From: daleharvey Date: Sun, 30 Jul 2006 13:31:08 +0000 Subject: [PATCH] merged with defines --- src/jabber_whiteboard/typedefs.h | 157 ------------------------------- 1 file changed, 157 deletions(-) delete mode 100644 src/jabber_whiteboard/typedefs.h diff --git a/src/jabber_whiteboard/typedefs.h b/src/jabber_whiteboard/typedefs.h deleted file mode 100644 index 363a68606..000000000 --- a/src/jabber_whiteboard/typedefs.h +++ /dev/null @@ -1,157 +0,0 @@ -/** - * Whiteboard session manager - * Typedef declarations and template specializations - * - * Authors: - * David Yip - * - * Copyright (c) 2005 Authors - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef __WHITEBOARD_TYPEDEFS_H__ -#define __WHITEBOARD_TYPEDEFS_H__ - -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "jabber_whiteboard/defines.h" -#include "jabber_whiteboard/keynode.h" - -#include "gc-alloc.h" - -namespace Inkscape { - -namespace XML { - -class Node; - -} - -namespace Util { - -template< typename T > -class ListContainer; - -} - -} - -// Various specializations of std::less for XMLNodeTracker maps. -namespace std { -using Inkscape::XML::Node; - -/** - * Specialization of std::less<> for pointers to XML::Nodes.a - * - * \see Inkscape::XML::Node - */ -template<> -struct less< Node* > : public binary_function < Node*, Node*, bool > -{ - bool operator()(Node* _x, Node* _y) const - { - return _x < _y; - } - -}; - -} - -namespace Inkscape { - -namespace Whiteboard { -// I am assuming that std::string (which will not properly represent Unicode data) will -// suffice for associating (integer, Jabber ID) identifiers with nodes. -// We do not need to preserve all semantics handled by Unicode; we just need to have -// the byte representation. std::string is good enough for that. -// -// The reason for this is that comparisons with std::string are much faster than -// comparisons with Glib::ustring (simply because the latter is using significantly -// more complex text-handling algorithms), and we need speed here. We _could_ use -// Glib::ustring::collate_key() here and therefore get the best of both worlds, -// but collation keys are rather big. -// -// XML node tracker maps - -/// Associates node keys to pointers to XML::Nodes. -/// \see Inkscape::Whiteboard::XMLNodeTracker -typedef std::map< std::string, XML::Node*, std::less< std::string >, GC::Alloc< std::pair< std::string, XML::Node* >, GC::MANUAL > > KeyToTrackerNodeMap; - -/// Associates pointers to XML::Nodes with node keys. -/// \see Inkscape::Whiteboard::XMLNodeTracker -typedef std::map< XML::Node*, std::string, std::less< XML::Node* >, GC::Alloc< std::pair< XML::Node*, std::string >, GC::MANUAL > > TrackerNodeToKeyMap; - - -// TODO: Clean up these typedefs. I'm sure quite a few of these aren't used anymore; additionally, -// it's probably possible to consolidate a few of these types into one. - -// Temporary storage of new object messages and new nodes in said messages -typedef std::list< Glib::ustring > NewChildObjectMessageList; - -typedef std::pair< KeyNodePair, NodeTrackerAction > SerializedEventNodeAction; - -typedef std::list< SerializedEventNodeAction > KeyToNodeActionList; - -//typedef std::map< std::string, SerializedEventNodeAction > KeyToNodeActionMap; - -typedef std::set< std::string > AttributesScannedSet; -typedef std::set< XML::Node* > AttributesUpdatedSet; - -typedef std::map< std::string, XML::Node const* > KeyToNodeMap; -typedef std::map< XML::Node const*, std::string > NodeToKeyMap; - - -// Buddy list management -typedef std::set< std::string > BuddyList; -typedef sigc::signal< void, std::string const& > BuddyListSignal; -typedef sigc::slot< void, std::string const& > BuddyListListener; - -// Chatroom list participants -typedef std::set< char const* > ChatterList; - -// Message context verification and processing -struct MessageProcessor; -class ReceiveMessageQueue; - -typedef std::map< MessageType, std::bitset< NUM_FLAGS > > MessageContextMap; -typedef std::map< MessageType, MessageProcessor*, std::less< MessageType >, GC::Alloc< std::pair< MessageType, MessageProcessor* >, GC::MANUAL > > MessageProcessorMap; - -typedef std::map< std::string, ReceiveMessageQueue*, std::less< std::string >, GC::Alloc< std::pair< std::string, ReceiveMessageQueue* >, GC::MANUAL > > RecipientToReceiveQueueMap; -typedef std::map< std::string, unsigned int > ReceipientToLatestTransactionMap; - -typedef std::string ReceivedCommitEvent; -typedef std::list< ReceivedCommitEvent > CommitsQueue; - -// Message serialization -typedef std::list< Glib::ustring > SerializedEventList; - -// Error handling -- someday -// TODO: finish and integrate this -//typedef boost::function< LmHandlerResult (unsigned int code) > ErrorHandlerFunctor; -//typedef std::map< unsigned int, ErrorHandlerFunctor > ErrorHandlerFunctorMap; -} - -} - - -#endif -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=c++:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : -- 2.30.2