ScaleOut C++ Native Client API  5.1
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends Pages
remove_result.h
1 /*
2  Copyright (c) 2013 by ScaleOut Software, Inc.
3 
4  Licensed under the Apache License, Version 2.0 (the "License");
5  you may not use this file except in compliance with the License.
6  You may obtain a copy of the License at
7 
8  http://www.apache.org/licenses/LICENSE-2.0
9 
10  Unless required by applicable law or agreed to in writing, software
11  distributed under the License is distributed on an "AS IS" BASIS,
12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  See the License for the specific language governing permissions and
14  limitations under the License.
15 */
16 
17 #pragma once
18 
19 #include <stdint.h>
20 #include "soss_svccli.h"
21 
22 namespace sosscli {
23 
26 {
27 public:
28 
31  {
38  };
39 
40  /* Constructors */
41 
43  RemoveResult(int32_t return_code) : return_code_(return_code) {}
44 
46  virtual ~RemoveResult() {}
47 
48  /* Accessors */
49 
51  int32_t return_code() { return return_code_; }
52 
55  {
56  if (return_code_ == SOSSLIB_RET_SUCCESS)
57  return ObjectRemoved;
58  else if (return_code_ == SOSSLIB_ERR_OBJ_NOT_FOUND)
59  return ObjectNotFound;
60  else
61  return Error;
62  }
63 
64 
65 protected:
66 
67 private:
68  RemoveResult() {}
69 
70  int32_t return_code_;
71 
72 };
73 
74 } // namespace