Hazelcast C++ Client
 All Classes Functions Variables Enumerations Pages
FieldType.h
1 /*
2  * Copyright (c) 2008-2015, 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 #ifndef HAZELCAST_FIELD_TYPE
17 #define HAZELCAST_FIELD_TYPE
18 
19 #include "hazelcast/util/HazelcastDll.h"
20 
21 namespace hazelcast {
22  namespace client {
23  namespace serialization {
24  class HAZELCAST_API FieldType {
25  public:
26  FieldType();
27 
28  FieldType(int type);
29 
30  FieldType(FieldType const& rhs);
31 
32  const byte getId() const;
33 
34  FieldType& operator=(FieldType const& rhs);
35 
36  bool operator==(FieldType const& rhs) const;
37 
38  bool operator!=(FieldType const& rhs) const;
39 
40  byte id;
41  };
42 
43  namespace FieldTypes {
44  static const FieldType TYPE_PORTABLE(0);
45  static const FieldType TYPE_BYTE(1);
46  static const FieldType TYPE_BOOLEAN(2);
47  static const FieldType TYPE_CHAR(3);
48  static const FieldType TYPE_SHORT(4);
49  static const FieldType TYPE_INT(5);
50  static const FieldType TYPE_LONG(6);
51  static const FieldType TYPE_FLOAT(7);
52  static const FieldType TYPE_DOUBLE(8);
53  static const FieldType TYPE_UTF(9);
54  static const FieldType TYPE_PORTABLE_ARRAY(10);
55  static const FieldType TYPE_BYTE_ARRAY(11);
56  static const FieldType TYPE_CHAR_ARRAY(12);
57  static const FieldType TYPE_SHORT_ARRAY(13);
58  static const FieldType TYPE_INT_ARRAY(14);
59  static const FieldType TYPE_LONG_ARRAY(15);
60  static const FieldType TYPE_FLOAT_ARRAY(16);
61  static const FieldType TYPE_DOUBLE_ARRAY(17);
62  }
63  }
64  }
65 }
66 #endif /* HAZELCAST_FIELD_TYPE */
67