EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OmmError.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2  *| This source code is provided under the Apache 2.0 license --
3  *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4  *| See the project's LICENSE.md for details. --
5  *| Copyright (C) 2019 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_OmmError_h
10 #define __thomsonreuters_ema_access_OmmError_h
11 
52 #include "Access/Include/Data.h"
53 
54 namespace thomsonreuters {
55 
56 namespace ema {
57 
58 namespace access {
59 
60 class OmmErrorDecoder;
61 
63 {
64 public :
65 
69  enum ErrorCode
70  {
71  NoErrorEnum = 0,
73  NoDictionaryEnum = 1,
75  IteratorSetFailureEnum = 2,
77  IteratorOverrunEnum = 3,
79  FieldIdNotFoundEnum = 4,
81  IncompleteDataEnum = 5,
83  UnsupportedDataTypeEnum = 6,
85  NoSetDefinitionEnum = 7,
87  UnknownErrorEnum = 8
88  };
89 
91 
92 
95  const EmaString& getErrorCodeAsString() const;
96 
100  DataType::DataTypeEnum getDataType() const;
101 
105  Data::DataCode getCode() const;
106 
110  const EmaBuffer& getAsHex() const;
111 
115  const EmaString& toString() const;
116 
120  ErrorCode getErrorCode() const;
122 
123 private:
124 
125  friend class Decoder;
126  friend class StaticDecoder;
127 
128  Decoder& getDecoder();
129  bool hasDecoder() const;
130 
131  const EmaString& toString( UInt64 ) const;
132 
133  const Encoder& getEncoder() const;
134  bool hasEncoder() const;
135 
136  OmmError();
137  virtual ~OmmError();
138  OmmError( const OmmError& );
139  OmmError& operator=( const OmmError& );
140 
141  mutable EmaString _toString;
142  OmmErrorDecoder* _pDecoder;
143  UInt64 _space[9];
144 };
145 
146 }
147 
148 }
149 
150 }
151 
152 #endif // __thomsonreuters_ema_access_OmmError_h
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:56
OmmError represents received Omm data who fails to process properly.
Definition: OmmError.h:62
EmaBuffer represents a general use binary buffer.
Definition: EmaBuffer.h:32
#define EMA_ACCESS_API
Definition: Common.h:95
Data class is a parent abstract class defining common interfaces for all Data type classes...
Definition: Data.h:38