diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-06 00:00:54 +0200 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2009-04-06 00:05:22 +0200 |
commit | 9113afb868f6c1da5911437d3ddabdcf169cbec2 (patch) | |
tree | 4efb107417b369e8362630fd49ea10fa38210f2a /src/net/ea/inventoryhandler.h | |
parent | 96e56ba80110b54af0ee8ebb3410bd4d9d21cdfe (diff) | |
download | mana-client-9113afb868f6c1da5911437d3ddabdcf169cbec2.tar.gz mana-client-9113afb868f6c1da5911437d3ddabdcf169cbec2.tar.bz2 mana-client-9113afb868f6c1da5911437d3ddabdcf169cbec2.tar.xz mana-client-9113afb868f6c1da5911437d3ddabdcf169cbec2.zip |
Use a namespace to keep apart implementations of network handlers
Since we'll have three "InventoryHandler" classes, etc. this shows an
example of how we can compile with all of them at the same time using
namespaces. We'll have:
Net::InventoryHandler - the interface
EAthena::InventoryHandler - the eAthena implementation
TmwServ::InventoryHandler - the tmwserv implementation
Maybe we'll find a better way later, but for now this works. I'm not
convinced yet that using namespaces is better than just using longer
class names like EAthenaInventoryHandler.
Diffstat (limited to 'src/net/ea/inventoryhandler.h')
-rw-r--r-- | src/net/ea/inventoryhandler.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index bfebc9b3..391c13f4 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -26,6 +26,8 @@ #include "net/messagehandler.h" #include "net/net.h" +namespace EAthena { + class InventoryHandler : public MessageHandler, public Net::InventoryHandler { public: @@ -51,6 +53,6 @@ class InventoryHandler : public MessageHandler, public Net::InventoryHandler StorageType destination); }; -extern InventoryHandler *inventoryHandler; +} // namespace EAthena #endif // NET_EA_INVENTORYHANDLER_H |