RCFProto

- Main Page
- Classes
- Files

- File List

All Classes Functions Typedefs
StubEntry.hpp
1
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18
19 #ifndef INCLUDE_RCF_STUBENTRY_HPP
20 #define INCLUDE_RCF_STUBENTRY_HPP
21
22 #include <boost/noncopyable.hpp>
23 #include <boost/shared_ptr.hpp>
24
25 #include <RCF/Export.hpp>
26 #include <RCF/ThreadLibrary.hpp>
27
28 namespace RCF {
29
30 class I_RcfClient;
31 class StubEntry;
32 typedef boost::shared_ptr<I_RcfClient> RcfClientPtr;
33 typedef boost::shared_ptr<StubEntry> StubEntryPtr;
34
35 class RCF_EXPORT TokenMapped
36 {
37 public:
38
39 TokenMapped();
40
41 virtual ~TokenMapped()
42 {}
43
44 virtual void touch();
45 virtual unsigned int getElapsedTimeS() const;
46
47 private:
48 mutable Mutex mMutex;
49 unsigned int mTimeStamp;
50 };
51
52 typedef boost::shared_ptr<TokenMapped> TokenMappedPtr;
53
54 // TODO: collapse this class into a RcfClientPtr.
55 class RCF_EXPORT StubEntry :
56 public TokenMapped,
57 boost::noncopyable
58 {
59 public:
60 StubEntry(RcfClientPtr rcfClientPtr);
61 RcfClientPtr getRcfClientPtr() const;
62
63 private:
64 RcfClientPtr mRcfClientPtr;
65 };
66
67 } // namespace RCF
68
69 #endif // ! INCLUDE_RCF_STUBENTRY_HPP