coherence/io/pof/PofConstants.hpp

00001 /*
00002 * PofConstants.hpp
00003 *
00004 * Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.
00005 *
00006 * Oracle is a registered trademarks of Oracle Corporation and/or its
00007 * affiliates.
00008 *
00009 * This software is the confidential and proprietary information of Oracle
00010 * Corporation. You shall not disclose such confidential and proprietary
00011 * information and shall use it only in accordance with the terms of the
00012 * license agreement you entered into with Oracle.
00013 *
00014 * This notice may not be removed or altered.
00015 */
00016 #ifndef COH_POF_CONSTANTS_HPP
00017 #define COH_POF_CONSTANTS_HPP
00018 
00019 #include "coherence/lang.ns"
00020 
00021 COH_OPEN_NAMESPACE3(coherence,io,pof)
00022 
00023 
00024 /**
00025 * Constants related to POF streams.
00026 *
00027 * @author jh  2008.04.09
00028 */
00029 class COH_EXPORT PofConstants
00030     : public abstract_spec<PofConstants>
00031     {
00032     // ----- POF intrinsic type constants -----------------------------------
00033 
00034     public:
00035         // NOTE: The hex value to the right is the packed integer value of
00036         // the constant.
00037         typedef enum
00038             {
00039             T_INT16                 = -1,       // 0x40
00040             T_INT32                 = -2,       // 0x41
00041             T_INT64                 = -3,       // 0x42
00042             T_INT128                = -4,       // 0x43
00043             T_FLOAT32               = -5,       // 0x44
00044             T_FLOAT64               = -6,       // 0x45
00045             T_FLOAT128              = -7,       // 0x46
00046             T_DECIMAL32             = -8,       // 0x47
00047             T_DECIMAL64             = -9,       // 0x48
00048             T_DECIMAL128            = -10,      // 0x49
00049             T_BOOLEAN               = -11,      // 0x4A
00050             T_OCTET                 = -12,      // 0x4B
00051             T_OCTET_STRING          = -13,      // 0x4C
00052             T_CHAR                  = -14,      // 0x4D
00053             T_CHAR_STRING           = -15,      // 0x4E
00054             T_DATE                  = -16,      // 0x4F
00055             T_YEAR_MONTH_INTERVAL   = -17,      // 0x50
00056             T_TIME                  = -18,      // 0x51
00057             T_TIME_INTERVAL         = -19,      // 0x52
00058             T_DATETIME              = -20,      // 0x53
00059             T_DAY_TIME_INTERVAL     = -21,      // 0x54
00060             T_COLLECTION            = -22,      // 0x55
00061             T_UNIFORM_COLLECTION    = -23,      // 0x56
00062             T_ARRAY                 = -24,      // 0x57
00063             T_UNIFORM_ARRAY         = -25,      // 0x58
00064             T_SPARSE_ARRAY          = -26,      // 0x59
00065             T_UNIFORM_SPARSE_ARRAY  = -27,      // 0x5A
00066             T_MAP                   = -28,      // 0x5B
00067             T_UNIFORM_KEYS_MAP      = -29,      // 0x5C
00068             T_UNIFORM_MAP           = -30,      // 0x5D
00069             T_IDENTITY              = -31,      // 0x5E
00070             T_REFERENCE             = -32       // 0x5F
00071             } PofType;
00072 
00073 
00074     // ----- POF compact "small" values -------------------------------------
00075 
00076     public:
00077         // NOTE: The hex value to the right is the packed integer value of
00078         // the constant.
00079         typedef enum
00080             {
00081             V_BOOLEAN_FALSE         = -33,      // 0x60
00082             V_BOOLEAN_TRUE          = -34,      // 0x61
00083             V_STRING_ZERO_LENGTH    = -35,      // 0x62
00084             V_COLLECTION_EMPTY      = -36,      // 0x63
00085             V_REFERENCE_NULL        = -37,      // 0x64
00086             V_FP_POS_INFINITY       = -38,      // 0x65
00087             V_FP_NEG_INFINITY       = -39,      // 0x66
00088             V_FP_NAN                = -40,      // 0x67
00089             V_INT_NEG_1             = -41,      // 0x68
00090             V_INT_0                 = -42,      // 0x69
00091             V_INT_1                 = -43,      // 0x6A
00092             V_INT_2                 = -44,      // 0x6B
00093             V_INT_3                 = -45,      // 0x6C
00094             V_INT_4                 = -46,      // 0x6D
00095             V_INT_5                 = -47,      // 0x6E
00096             V_INT_6                 = -48,      // 0x6F
00097             V_INT_7                 = -49,      // 0x70
00098             V_INT_8                 = -50,      // 0x71
00099             V_INT_9                 = -51,      // 0x72
00100             V_INT_10                = -52,      // 0x73
00101             V_INT_11                = -53,      // 0x74
00102             V_INT_12                = -54,      // 0x75
00103             V_INT_13                = -55,      // 0x76
00104             V_INT_14                = -56,      // 0x77
00105             V_INT_15                = -57,      // 0x78
00106             V_INT_16                = -58,      // 0x79
00107             V_INT_17                = -59,      // 0x7A
00108             V_INT_18                = -60,      // 0x7B
00109             V_INT_19                = -61,      // 0x7C
00110             V_INT_20                = -62,      // 0x7D
00111             V_INT_21                = -63,      // 0x7E
00112             V_INT_22                = -64       // 0x7F
00113             } PofValue;
00114 
00115 
00116     // ----- C++ type constants ---------------------------------------------
00117 
00118     public:
00119         typedef enum
00120             {
00121             C_NULL                      = 0,
00122             C_BOOLEAN                   = 1,
00123             C_OCTET                     = 2,
00124             C_CHAR16                    = 3,
00125             C_INT16                     = 4,
00126             C_INT32                     = 5,
00127             C_INT64                     = 6,
00128             C_FLOAT32                   = 7,
00129             C_FLOAT64                   = 8,
00130             C_BINARY                    = 9,
00131             C_STRING                    = 10,
00132             C_RAW_DATE                  = 11,
00133             C_RAW_DATE_TIME             = 12,
00134             C_RAW_DAY_TIME_INTERVAL     = 13,
00135             C_RAW_TIME                  = 14,
00136             C_RAW_TIME_INTERVAL         = 15,
00137             C_RAW_YEAR_MONTH_INTERVAL   = 16,
00138             C_BOOLEAN_ARRAY             = 17,
00139             C_OCTET_ARRAY               = 18,
00140             C_CHAR16_ARRAY              = 19,
00141             C_INT16_ARRAY               = 20,
00142             C_INT32_ARRAY               = 21,
00143             C_INT64_ARRAY               = 22,
00144             C_FLOAT32_ARRAY             = 23,
00145             C_FLOAT64_ARRAY             = 24,
00146             C_OBJECT_ARRAY              = 25,
00147             C_SPARSE_ARRAY              = 26,
00148             C_COLLECTION                = 27,
00149             C_MAP                       = 28,
00150             C_USER_TYPE                 = 29
00151             } CppType;
00152     };
00153 
00154 COH_CLOSE_NAMESPACE3
00155 
00156 #endif // COH_POF_CONSTANTS_HPP
Copyright (c) 2000, 2009, Oracle and/or its affiliates. All rights reserved.