MessageAck.hpp 5.17 KB
Newer Older
1
2
/**** This file has been autogenerated by gencastor from Umbrello UML model ***/

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/******************************************************************************
 *                      castor/MessageAck.hpp
 *
 * This file is part of the Castor project.
 * See http://castor.web.cern.ch/castor
 *
 * Copyright (C) 2003  CERN
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *
 * @author Castor Dev team, castor-dev@cern.ch
 *****************************************************************************/

25
#pragma once
26
27
28

// Include Files
#include "castor/IObject.hpp"
29
#include "osdep.h"
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
#include <iostream>
#include <string>

namespace castor {

  // Forward declarations
  class ObjectSet;

  /**
   * class MessageAck
   * Acknowledgement message in the request handler protocol.
   */
  class MessageAck : public virtual IObject {

  public:

    /**
     * Empty Constructor
     */
    MessageAck() throw();

    /**
     * Empty Destructor
     */
    virtual ~MessageAck() throw();

    /**
     * Outputs this object in a human readable format
     * @param stream The stream where to print this object
     * @param indent The indentation to use
     * @param alreadyPrinted The set of objects already printed.
     * This is to avoid looping when printing circular dependencies
     */
    virtual void print(std::ostream& stream,
                       std::string indent,
                       castor::ObjectSet& alreadyPrinted) const;

    /**
     * Outputs this object in a human readable format
     */
    virtual void print() const;

    /**
     * Gets the type of this kind of objects
     */
    static int TYPE();

    /********************************************/
    /* Implementation of IObject abstract class */
    /********************************************/
    /**
     * Gets the type of the object
     */
    virtual int type() const;

85
86
87
88
89
    /**
     * virtual method to clone any object
     */
    virtual IObject* clone();

90
91
92
93
94
    /*********************************/
    /* End of IObject abstract class */
    /*********************************/
    /**
     * Get the value of m_status
95
     * Status of the request
96
97
98
99
100
101
102
103
     * @return the value of m_status
     */
    bool status() const {
      return m_status;
    }

    /**
     * Set the value of m_status
104
     * Status of the request
105
106
107
108
109
110
111
112
     * @param new_var the new value of m_status
     */
    void setStatus(bool new_var) {
      m_status = new_var;
    }

    /**
     * Get the value of m_errorCode
113
     * Code of the error if status shows there is one
114
115
116
117
118
119
120
121
     * @return the value of m_errorCode
     */
    int errorCode() const {
      return m_errorCode;
    }

    /**
     * Set the value of m_errorCode
122
     * Code of the error if status shows there is one
123
124
125
126
127
128
129
130
     * @param new_var the new value of m_errorCode
     */
    void setErrorCode(int new_var) {
      m_errorCode = new_var;
    }

    /**
     * Get the value of m_errorMessage
131
     * Error message if status shows there is an error
132
133
134
135
136
137
138
139
     * @return the value of m_errorMessage
     */
    std::string errorMessage() const {
      return m_errorMessage;
    }

    /**
     * Set the value of m_errorMessage
140
     * Error message if status shows there is an error
141
142
143
144
145
146
     * @param new_var the new value of m_errorMessage
     */
    void setErrorMessage(std::string new_var) {
      m_errorMessage = new_var;
    }

147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
    /**
     * Get the value of m_requestId
     * Cuuid associated to the request in case there was no error
     * @return the value of m_requestId
     */
    std::string requestId() const {
      return m_requestId;
    }

    /**
     * Set the value of m_requestId
     * Cuuid associated to the request in case there was no error
     * @param new_var the new value of m_requestId
     */
    void setRequestId(std::string new_var) {
      m_requestId = new_var;
    }

165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
    /**
     * Get the value of m_id
     * The id of this object
     * @return the value of m_id
     */
    u_signed64 id() const {
      return m_id;
    }

    /**
     * Set the value of m_id
     * The id of this object
     * @param new_var the new value of m_id
     */
    void setId(u_signed64 new_var) {
      m_id = new_var;
    }
182
183
184

  private:

185
    /// Status of the request
186
187
    bool m_status;

188
    /// Code of the error if status shows there is one
189
190
    int m_errorCode;

191
    /// Error message if status shows there is an error
192
193
    std::string m_errorMessage;

194
195
196
    /// Cuuid associated to the request in case there was no error
    std::string m_requestId;

197
    /// The id of this object
198
    u_signed64 m_id;
199

200
  }; /* end of class MessageAck */
201

202
} /* end of namespace castor */
203