Ice 3.7 C++98 API Reference
Loading...
Searching...
No Matches
FactoryTable.h
Go to the documentation of this file.
1//
2// Copyright (c) ZeroC, Inc. All rights reserved.
3//
4
5#ifndef ICE_FACTORYTABLE_H
6#define ICE_FACTORYTABLE_H
7
8#include <IceUtil/Mutex.h>
10#include <Ice/ValueFactory.h>
11
12namespace Ice
13{
14
21{
22public:
23
29 virtual ::std::string resolve(Ice::Int id) const = 0;
30};
32
33}
34
35namespace IceInternal
36{
37
38class ICE_API FactoryTable : private IceUtil::noncopyable
39{
40public:
41
42 void addExceptionFactory(const ::std::string&, ICE_IN(ICE_DELEGATE(::Ice::UserExceptionFactory)));
43 ICE_DELEGATE(::Ice::UserExceptionFactory) getExceptionFactory(const ::std::string&) const;
44 void removeExceptionFactory(const ::std::string&);
45
46 void addValueFactory(const ::std::string&, ICE_IN(ICE_DELEGATE(::Ice::ValueFactory)));
47 ICE_DELEGATE(::Ice::ValueFactory) getValueFactory(const ::std::string&) const;
48 void removeValueFactory(const ::std::string&);
49
50 void addTypeId(int, const ::std::string&);
51 std::string getTypeId(int) const;
52 void removeTypeId(int);
53
54private:
55
57
58 typedef ::std::pair< ICE_DELEGATE(::Ice::UserExceptionFactory), int> EFPair;
59 typedef ::std::map< ::std::string, EFPair> EFTable;
60 EFTable _eft;
61
62 typedef ::std::pair< ICE_DELEGATE(::Ice::ValueFactory), int> VFPair;
63 typedef ::std::map< ::std::string, VFPair> VFTable;
64 VFTable _vft;
65
66 typedef ::std::pair< ::std::string, int> TypeIdPair;
67 typedef ::std::map<int, TypeIdPair> TypeIdTable;
68 TypeIdTable _typeIdTable;
69};
70
71}
72
73#endif
#define ICE_DELEGATE(T)
Definition Config.h:387
#define ICE_API
Definition Config.h:197
#define ICE_IN(...)
Definition Config.h:388
Definition Handle.h:143
Definition Mutex.h:33
Definition Shared.h:78
Definition Config.h:313
The base class for a compact ID resolver.
Definition FactoryTable.h:21
virtual::std::string resolve(Ice::Int id) const =0
Called by the Ice run time when a compact ID must be translated into a type ID.
Creates and throws a user exception.
Definition UserExceptionFactory.h:50
A factory for values.
Definition ValueFactory.h:193
Definition BuiltinSequences.h:113
int Int
The mapping for the Slice int type.
Definition Config.h:54
IceUtil::Handle< CompactIdResolver > CompactIdResolverPtr
Definition FactoryTable.h:31