Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ErrorResponse.h
Go to the documentation of this file.
1 #ifndef SAFIR_DOB_ERRORRESPONSE_H_INCLUDED
2 #define SAFIR_DOB_ERRORRESPONSE_H_INCLUDED
3 
8 
9 #include <Safir/Dob/Response.h>
11 
12 #include <Safir/Utilities/Internal/VisibilityHelpers.h>
13 
14 #ifdef dots_generated_Safir_cpp_EXPORTS
15 # define DOTS_GENERATED_Safir_API SAFIR_HELPER_DLL_EXPORT
16 #else
17 # define DOTS_GENERATED_Safir_API SAFIR_HELPER_DLL_IMPORT
18 # define SAFIR_LIBRARY_NAME "dots_generated-Safir-cpp"
19 # include <Safir/Utilities/Internal/AutoLink.h>
20 #endif
21 #define DOTS_GENERATED_Safir_API_LOCAL SAFIR_HELPER_DLL_LOCAL
22 
26 namespace Safir
27 {
31 namespace Dob
32 {
33 
34  class ErrorResponse; //forward declaration
35  typedef boost::shared_ptr<ErrorResponse> ErrorResponsePtr;
36  typedef boost::shared_ptr<const ErrorResponse> ErrorResponseConstPtr;
37 
40 
46  {
47  public:
48  //Constructors and Create routines
49  ErrorResponse();
50  virtual Safir::Dob::Typesystem::ObjectPtr Clone() const;
51  static ErrorResponsePtr Create();
52 
56  static ErrorResponsePtr CreateErrorResponse(
57  const std::wstring & Code,
58  const std::wstring & AdditionalInfo);
59 
60 
61  //Code
62  static Safir::Dob::Typesystem::MemberIndex CodeMemberIndex();
63  static Safir::Dob::Typesystem::Int32 CodeMaxStringLength();
69 
70 
71  //AdditionalInfo
72  static Safir::Dob::Typesystem::MemberIndex AdditionalInfoMemberIndex();
73  static Safir::Dob::Typesystem::Int32 AdditionalInfoMaxStringLength();
79 
80 
82  static const Safir::Dob::Typesystem::TypeId ClassTypeId = -7584868728779966772LL;
83 
84  //Type id for ErrorResponse
85  virtual Safir::Dob::Typesystem::TypeId GetTypeId() const {return ClassTypeId;}
86 
87  //Check if anything in the object has change flags set
88  virtual bool IsChanged();
89 
90  //Recursively set all change flags in the object
91  virtual void SetChanged(const bool changed);
92 
93 
94  //Reflection part (Don't use unless you really know what you're doing!!)
98  const Safir::Dob::Typesystem::ArrayIndex index) const;
99 
100  virtual Safir::Dob::Typesystem::Int32 CalculateBlobSize() const;
101  virtual void WriteToBlob(char * blob, char * & beginningOfUnused) const;
102  explicit ErrorResponse(char const * const blob);
103 
104  private:
105 
106 #ifdef _MSC_VER
107 #pragma warning (push)
108 #pragma warning (disable : 4251)
109 #endif
110 
112  Safir::Dob::Typesystem::StringContainer m_AdditionalInfoMember;
113 
114 #ifdef _MSC_VER
115 #pragma warning (pop)
116 #endif
117  };
118 
119 } // Dob
120 } // Safir
121 
122 #endif
123 
boost::shared_ptr< const ErrorResponse > ErrorResponseConstPtr
Definition: ErrorResponse.h:36
Definition: ContainerProxies.h:38
virtual Safir::Dob::Typesystem::TypeId GetTypeId() const
Get the type id of this object.
Definition: ErrorResponse.h:85
boost::shared_ptr< ErrorResponse > ErrorResponsePtr
Definition: ErrorResponse.h:34
The baseclass for all responses.
Definition: Response.h:43
Safir::Dob::Typesystem::ArrayContainer< ErrorResponseContainer > ErrorResponseContainerArray
Definition: ErrorResponse.h:39
DotsC_TypeId TypeId
A unique type identifier.
Definition: Defs.h:219
Template class for all containers of automatically generated DOB objects.
Definition: ObjectContainer.h:185
Container for strings (std::wstring).
Definition: ValueContainers.h:128
boost::shared_ptr< Object > ObjectPtr
A smart pointer to an Object.
Definition: Object.h:41
DotsC_ArrayIndex ArrayIndex
Index into an array.
Definition: Defs.h:247
Safir::Dob::Typesystem::ObjectContainerImpl< ErrorResponse > ErrorResponseContainer
Definition: ErrorResponse.h:38
Base class for all Containers.
Definition: ContainerBase.h:41
The baseclass for all error responses.
Definition: ErrorResponse.h:45
#define DOTS_GENERATED_Safir_API
Definition: ErrorResponse.h:17
STL container for arrays of DOB-containers.
Definition: ArrayContainer.h:58
DotsC_Int32 Int32
32 bit integer type.
Definition: Defs.h:67
DotsC_MemberIndex MemberIndex
The index of a member in an object.
Definition: Defs.h:238
static bool IsChanged(const ContainerBase &container)
Check if a container is changed.
Definition: ContainerBase.h:134