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 #pragma warning(disable: 4250) //for warning class1' : inherits 'class2::member' via dominance
32 #endif
33 
34 namespace hazelcast {
35  namespace client {
36  namespace impl {
37  class BaseEventHandler;
38 
39  class HazelcastClientInstanceImpl;
40  }
41 
42  namespace serialization {
43  namespace pimpl {
44  class Data;
45  }
46  }
47 
68  class HAZELCAST_API DistributedObject : public virtual IDistributedObject {
69  friend class impl::HazelcastClientInstanceImpl;
70 
71  public:
75  const std::string& getServiceName() const;
76 
82  const std::string& getName() const;
83 
88  virtual void destroy() = 0;
89 
93  virtual ~DistributedObject();
94 
95  protected:
99  DistributedObject(const std::string& serviceName, const std::string& objectName);
100 
104  virtual void onDestroy();
105 
106  impl::DistributedObjectInfo info;
107  };
108 
109  }
110 }
111 
112 #if defined(WIN32) || defined(_WIN32) || defined(WIN64) || defined(_WIN64)
113 #pragma warning(pop)
114 #endif
115 
116 #endif //HAZELCAST_DistributedObject
117 
Base class for all distributed objects.
Definition: DistributedObject.h:68
Definition: IDistributedObject.h:33
PN (Positive-Negative) CRDT counter.
Definition: MapEntryView.h:32