Hazelcast C++ Client
DistributedObject.h
1 /*
2  * Copyright (c) 2008-2018, Hazelcast, Inc. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 //
17 // Created by sancar koyunlu on 12/11/13.
18 
19 #ifndef HAZELCAST_DistributedObject
20 #define HAZELCAST_DistributedObject
21 
22 #include "hazelcast/util/HazelcastDll.h"
23 #include "hazelcast/client/impl/DistributedObjectInfo.h"
24 #include "hazelcast/client/IDistributedObject.h"
25 
26 #include <string>
27 
28 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
29 #pragma warning(push)
30 #pragma warning(disable: 4251) //for dll export
31 #endif
32 
33 namespace hazelcast {
34  namespace client {
35  namespace impl {
36  class BaseEventHandler;
37 
38  class HazelcastClientInstanceImpl;
39  }
40 
41  namespace serialization {
42  namespace pimpl {
43  class Data;
44  }
45  }
46 
67  class HAZELCAST_API DistributedObject : public IDistributedObject {
68  friend class impl::HazelcastClientInstanceImpl;
69 
70  public:
74  const std::string& getServiceName() const;
75 
81  const std::string& getName() const;
82 
87  virtual void destroy() = 0;
88 
92  virtual ~DistributedObject();
93 
94  protected:
98  DistributedObject(const std::string& serviceName, const std::string& objectName);
99 
103  virtual void onDestroy();
104 
105  impl::DistributedObjectInfo info;
106  };
107 
108  }
109 }
110 
111 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
112 #pragma warning(pop)
113 #endif
114 
115 #endif //HAZELCAST_DistributedObject
116 
Base class for all distributed objects.
Definition: DistributedObject.h:67
Definition: IDistributedObject.h:33
Definition: MapEntryView.h:32