Merge pull request #2222 from jwillemsen/jwi-dllexportwarning
[ACE_TAO.git] / TAO / tests / Transport_Cache_Manager / mock_transport.h
blob31e8441b819c0718665d08bc2abbb2fac31e6b5f
1 class mock_transport
3 public:
4 mock_transport () : id_(0), is_connected_(false), entry_(0), purging_order_ (0), purged_count_ (0) {}
5 size_t id () const {return id_;}
6 void id (size_t id) { this->id_ = id;}
7 unsigned long purging_order () const {return purging_order_;}
8 void purging_order (unsigned long purging_order) { this->purging_order_ = purging_order;}
9 bool is_connected () const {return is_connected_;}
10 void is_connected (bool is_connected) { this->is_connected_ = is_connected;}
11 ACE_Event_Handler::Reference_Count add_reference () {return 0;}
12 ACE_Event_Handler::Reference_Count remove_reference () {return 0;}
13 void cache_map_entry (TCM::HASH_MAP_ENTRY *entry) {this->entry_ = entry;}
14 TCM::HASH_MAP_ENTRY *cache_map_entry () {return this->entry_;}
15 void close_connection () { purged_count_ = ++global_purged_count;};
16 int purged_count () { return this->purged_count_;}
17 bool can_be_purged () { return true;}
18 private:
19 size_t id_;
20 bool is_connected_;
21 TCM::HASH_MAP_ENTRY *entry_;
22 unsigned long purging_order_;
23 /// When did we got purged
24 int purged_count_;