You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@etch.apache.org by gr...@apache.org on 2011/02/01 11:08:22 UTC

svn commit: r1065977 - in /incubator/etch/trunk/binding-cpp/runtime/include/common: EtchBool.h EtchByte.h EtchConfig.h EtchDouble.h EtchFloat.h EtchLong.h EtchObject.h EtchShort.h

Author: grandyho
Date: Tue Feb  1 10:08:21 2011
New Revision: 1065977

URL: http://svn.apache.org/viewvc?rev=1065977&view=rev
Log:
ETCH-150
header files for primitive types

Added:
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h
      - copied, changed from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h
      - copied, changed from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h
      - copied, changed from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h
      - copied, changed from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h
      - copied, changed from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h
      - copied, changed from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
Modified:
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h
    incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h

Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h (from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h)
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h&p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&r1=1065971&r2=1065977&rev=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchBool.h Tue Feb  1 10:08:21 2011
@@ -1,55 +1,59 @@
-/* $Id$ 
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more 
- * contributor license agreements. See the NOTICE file distributed with  
- * this work for additional information regarding copyright ownership. 
- * The ASF licenses this file to you under the Apache License, Version  
- * 2.0 (the "License"); you may not use this file except in compliance  
- * with the License. You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-#ifndef __ETCHOBJECT_H__
-#define __ETCHOBJECT_H__
-
-#include "EtchConfig.h"
-
-enum EtchObjectTypeIds {
-    EOTID_INT32     = 0,
-    EOTID_DOUBLE,
-    EOTID_FLOAT,
-    EOTID_STRING,
-    EOTID_DATE,
-    EOTID_LIST
-};
-
-class EtchObject
-{
-public:
-    /**
-     * Constructor.
-     */
-    EtchObject(int32_t typeId);
-    
-    /**
-     * Destructor.
-     */
-    virtual ~EtchObject();
-
-    /**
-     * Returns object type id.
-     */
-    int32_t getObjectTypeId();
-
-private:
-    int32_t m_typeId;
-};
-
-#endif
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */
+
+#ifndef __ETCHBOOL_H__
+#define __ETCHBOOL_H__
+
+#include "common/EtchObject.h"
+#include "common/EtchError.h"
+
+class EtchBool :
+    public EtchObject
+{
+public:
+
+    /**
+     * TypeId for EtchBool.
+     */
+    static const int32_t TYPE_ID = EOTID_BOOL;
+
+    /**
+     * Constructs a EtchBool object.
+     */
+    EtchBool();
+
+    /**
+     * Constructs a EtchBool object with given value.
+     */
+    EtchBool(bool value);
+
+    /**
+     * Sets bool value.
+     */
+    void set(bool value);
+
+    /**
+     * Returns bool value.
+     */
+    bool get();
+
+private:
+    bool m_value;
+};
+
+#endif

Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h (from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h)
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h&p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&r1=1065971&r2=1065977&rev=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchByte.h Tue Feb  1 10:08:21 2011
@@ -1,55 +1,59 @@
-/* $Id$ 
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more 
- * contributor license agreements. See the NOTICE file distributed with  
- * this work for additional information regarding copyright ownership. 
- * The ASF licenses this file to you under the Apache License, Version  
- * 2.0 (the "License"); you may not use this file except in compliance  
- * with the License. You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-#ifndef __ETCHOBJECT_H__
-#define __ETCHOBJECT_H__
-
-#include "EtchConfig.h"
-
-enum EtchObjectTypeIds {
-    EOTID_INT32     = 0,
-    EOTID_DOUBLE,
-    EOTID_FLOAT,
-    EOTID_STRING,
-    EOTID_DATE,
-    EOTID_LIST
-};
-
-class EtchObject
-{
-public:
-    /**
-     * Constructor.
-     */
-    EtchObject(int32_t typeId);
-    
-    /**
-     * Destructor.
-     */
-    virtual ~EtchObject();
-
-    /**
-     * Returns object type id.
-     */
-    int32_t getObjectTypeId();
-
-private:
-    int32_t m_typeId;
-};
-
-#endif
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */
+
+#ifndef __ETCHBYTE_H__
+#define __ETCHBYTE_H__
+
+#include "common/EtchObject.h"
+#include "common/EtchError.h"
+
+class EtchByte :
+    public EtchObject
+{
+public:
+
+    /**
+     * TypeId for EtchByte.
+     */
+    static const int32_t TYPE_ID = EOTID_BYTE;
+
+    /**
+     * Constructs a EtchByte object.
+     */
+    EtchByte();
+
+    /**
+     * Constructs a EtchByte object with given value.
+     */
+    EtchByte(int8_t value);
+
+    /**
+     * Sets byte value.
+     */
+    void set(int8_t value);
+
+    /**
+     * Returns byte value.
+     */
+    int8_t get();
+
+private:
+    int8_t m_value;
+};
+
+#endif

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h?rev=1065977&r1=1065976&r2=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchConfig.h Tue Feb  1 10:08:21 2011
@@ -22,9 +22,14 @@
 #include "stdio.h"
 #include "stdlib.h"
 #include "string.h"
-
-// datatype configs
-
+
+#ifdef _WIN32
+typedef char int8_t;
+typedef short int16_t;
 typedef int int32_t;
+typedef signed __int64 int64_t;
+#else //other OS should be C99 compliant
+#include "stdint.h"
+#endif //_WIN32
 
 #endif

Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h (from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h)
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h&p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&r1=1065971&r2=1065977&rev=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchDouble.h Tue Feb  1 10:08:21 2011
@@ -1,55 +1,59 @@
-/* $Id$ 
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more 
- * contributor license agreements. See the NOTICE file distributed with  
- * this work for additional information regarding copyright ownership. 
- * The ASF licenses this file to you under the Apache License, Version  
- * 2.0 (the "License"); you may not use this file except in compliance  
- * with the License. You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-#ifndef __ETCHOBJECT_H__
-#define __ETCHOBJECT_H__
-
-#include "EtchConfig.h"
-
-enum EtchObjectTypeIds {
-    EOTID_INT32     = 0,
-    EOTID_DOUBLE,
-    EOTID_FLOAT,
-    EOTID_STRING,
-    EOTID_DATE,
-    EOTID_LIST
-};
-
-class EtchObject
-{
-public:
-    /**
-     * Constructor.
-     */
-    EtchObject(int32_t typeId);
-    
-    /**
-     * Destructor.
-     */
-    virtual ~EtchObject();
-
-    /**
-     * Returns object type id.
-     */
-    int32_t getObjectTypeId();
-
-private:
-    int32_t m_typeId;
-};
-
-#endif
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */
+
+#ifndef __ETCHDOUBLE_H__
+#define __ETCHDOUBLE_H__
+
+#include "common/EtchObject.h"
+#include "common/EtchError.h"
+
+class EtchDouble :
+    public EtchObject
+{
+public:
+
+    /**
+     * TypeId for EtchDouble.
+     */
+    static const int32_t TYPE_ID = EOTID_DOUBLE;
+
+    /**
+     * Constructs a EtchDouble object.
+     */
+    EtchDouble();
+
+    /**
+     * Constructs a EtchDouble object with given value.
+     */
+    EtchDouble(double value);
+
+    /**
+     * Sets double value.
+     */
+    void set(double value);
+
+    /**
+     * Returns double value.
+     */
+    double get();
+
+private:
+    double m_value;
+};
+
+#endif

Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h (from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h)
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h&p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&r1=1065971&r2=1065977&rev=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchFloat.h Tue Feb  1 10:08:21 2011
@@ -1,55 +1,59 @@
-/* $Id$ 
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more 
- * contributor license agreements. See the NOTICE file distributed with  
- * this work for additional information regarding copyright ownership. 
- * The ASF licenses this file to you under the Apache License, Version  
- * 2.0 (the "License"); you may not use this file except in compliance  
- * with the License. You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-#ifndef __ETCHOBJECT_H__
-#define __ETCHOBJECT_H__
-
-#include "EtchConfig.h"
-
-enum EtchObjectTypeIds {
-    EOTID_INT32     = 0,
-    EOTID_DOUBLE,
-    EOTID_FLOAT,
-    EOTID_STRING,
-    EOTID_DATE,
-    EOTID_LIST
-};
-
-class EtchObject
-{
-public:
-    /**
-     * Constructor.
-     */
-    EtchObject(int32_t typeId);
-    
-    /**
-     * Destructor.
-     */
-    virtual ~EtchObject();
-
-    /**
-     * Returns object type id.
-     */
-    int32_t getObjectTypeId();
-
-private:
-    int32_t m_typeId;
-};
-
-#endif
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */
+
+#ifndef __ETCHFLOAT_H__
+#define __ETCHFLOAT_H__
+
+#include "common/EtchObject.h"
+#include "common/EtchError.h"
+
+class EtchFloat :
+    public EtchObject
+{
+public:
+
+    /**
+     * TypeId for EtchFloat.
+     */
+    static const int32_t TYPE_ID = EOTID_FLOAT;
+
+    /**
+     * Constructs a EtchFloat object.
+     */
+    EtchFloat();
+
+    /**
+     * Constructs a EtchFloat object with given value.
+     */
+    EtchFloat(float value);
+
+    /**
+     * Sets float value.
+     */
+    void set(float value);
+
+    /**
+     * Returns float value.
+     */
+    float get();
+
+private:
+    float m_value;
+};
+
+#endif

Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h (from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h)
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h&p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&r1=1065971&r2=1065977&rev=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchLong.h Tue Feb  1 10:08:21 2011
@@ -1,55 +1,59 @@
-/* $Id$ 
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more 
- * contributor license agreements. See the NOTICE file distributed with  
- * this work for additional information regarding copyright ownership. 
- * The ASF licenses this file to you under the Apache License, Version  
- * 2.0 (the "License"); you may not use this file except in compliance  
- * with the License. You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-#ifndef __ETCHOBJECT_H__
-#define __ETCHOBJECT_H__
-
-#include "EtchConfig.h"
-
-enum EtchObjectTypeIds {
-    EOTID_INT32     = 0,
-    EOTID_DOUBLE,
-    EOTID_FLOAT,
-    EOTID_STRING,
-    EOTID_DATE,
-    EOTID_LIST
-};
-
-class EtchObject
-{
-public:
-    /**
-     * Constructor.
-     */
-    EtchObject(int32_t typeId);
-    
-    /**
-     * Destructor.
-     */
-    virtual ~EtchObject();
-
-    /**
-     * Returns object type id.
-     */
-    int32_t getObjectTypeId();
-
-private:
-    int32_t m_typeId;
-};
-
-#endif
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */
+
+#ifndef __ETCHLONG_H__
+#define __ETCHLONG_H__
+
+#include "common/EtchObject.h"
+#include "common/EtchError.h"
+
+class EtchLong :
+    public EtchObject
+{
+public:
+
+    /**
+     * TypeId for EtchLong.
+     */
+    static const int32_t TYPE_ID = EOTID_LONG;
+
+    /**
+     * Constructs a EtchLong object.
+     */
+    EtchLong();
+
+    /**
+     * Constructs a EtchLong object with given value.
+     */
+    EtchLong(int64_t value);
+
+    /**
+     * Sets long value.
+     */
+    void set(int64_t value);
+
+    /**
+     * Returns long value.
+     */
+    int64_t get();
+
+private:
+    int64_t m_value;
+};
+
+#endif

Modified: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h?rev=1065977&r1=1065976&r2=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h Tue Feb  1 10:08:21 2011
@@ -23,6 +23,10 @@
 
 enum EtchObjectTypeIds {
     EOTID_INT32     = 0,
+    EOTID_BOOL,
+    EOTID_BYTE,
+    EOTID_SHORT,
+    EOTID_LONG,
     EOTID_DOUBLE,
     EOTID_FLOAT,
     EOTID_STRING,

Copied: incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h (from r1065971, incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h)
URL: http://svn.apache.org/viewvc/incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h?p2=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h&p1=incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h&r1=1065971&r2=1065977&rev=1065977&view=diff
==============================================================================
--- incubator/etch/trunk/binding-cpp/runtime/include/common/EtchObject.h (original)
+++ incubator/etch/trunk/binding-cpp/runtime/include/common/EtchShort.h Tue Feb  1 10:08:21 2011
@@ -1,55 +1,59 @@
-/* $Id$ 
- * 
- * Licensed to the Apache Software Foundation (ASF) under one or more 
- * contributor license agreements. See the NOTICE file distributed with  
- * this work for additional information regarding copyright ownership. 
- * The ASF licenses this file to you under the Apache License, Version  
- * 2.0 (the "License"); you may not use this file except in compliance  
- * with the License. You may obtain a copy of the License at 
- * 
- * http://www.apache.org/licenses/LICENSE-2.0 
- * 
- * Unless required by applicable law or agreed to in writing, software 
- * distributed under the License is distributed on an "AS IS" BASIS, 
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and 
- * limitations under the License. 
- */
-
-#ifndef __ETCHOBJECT_H__
-#define __ETCHOBJECT_H__
-
-#include "EtchConfig.h"
-
-enum EtchObjectTypeIds {
-    EOTID_INT32     = 0,
-    EOTID_DOUBLE,
-    EOTID_FLOAT,
-    EOTID_STRING,
-    EOTID_DATE,
-    EOTID_LIST
-};
-
-class EtchObject
-{
-public:
-    /**
-     * Constructor.
-     */
-    EtchObject(int32_t typeId);
-    
-    /**
-     * Destructor.
-     */
-    virtual ~EtchObject();
-
-    /**
-     * Returns object type id.
-     */
-    int32_t getObjectTypeId();
-
-private:
-    int32_t m_typeId;
-};
-
-#endif
+/* $Id$ 
+ * 
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
+ * contributor license agreements. See the NOTICE file distributed with  
+ * this work for additional information regarding copyright ownership. 
+ * The ASF licenses this file to you under the Apache License, Version  
+ * 2.0 (the "License"); you may not use this file except in compliance  
+ * with the License. You may obtain a copy of the License at 
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0 
+ * 
+ * Unless required by applicable law or agreed to in writing, software 
+ * distributed under the License is distributed on an "AS IS" BASIS, 
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and 
+ * limitations under the License. 
+ */
+
+#ifndef __ETCHSHORT_H__
+#define __ETCHSHORT_H__
+
+#include "common/EtchObject.h"
+#include "common/EtchError.h"
+
+class EtchShort :
+    public EtchObject
+{
+public:
+
+    /**
+     * TypeId for EtchShort.
+     */
+    static const int32_t TYPE_ID = EOTID_SHORT;
+
+    /**
+     * Constructs a EtchShort object.
+     */
+    EtchShort();
+
+    /**
+     * Constructs a EtchShort object with given value.
+     */
+    EtchShort(int16_t value);
+
+    /**
+     * Sets short value.
+     */
+    void set(int16_t value);
+
+    /**
+     * Returns short value.
+     */
+    int16_t get();
+
+private:
+    int16_t m_value;
+};
+
+#endif