Kinetic C/C++ Client
Main Page
Classes
Files
File List
All
Classes
Functions
Variables
Pages
include
kinetic
outgoing_value.h
1
/*
2
* kinetic-cpp-client
3
* Copyright (C) 2014 Seagate Technology.
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
*
19
*/
20
21
#ifndef KINETIC_CPP_CLIENT_OUTGOING_VALUE_H_
22
#define KINETIC_CPP_CLIENT_OUTGOING_VALUE_H_
23
24
#include <string>
25
26
#include "common.h"
27
28
namespace
kinetic
{
29
30
class
OutgoingValueInterface
{
31
public
:
32
virtual
~
OutgoingValueInterface
() {}
33
virtual
size_t
size()
const
= 0;
34
virtual
bool
TransferToSocket(
int
fd,
int
* err)
const
= 0;
35
virtual
bool
ToString(std::string *result,
int
* err)
const
= 0;
36
};
37
38
class
OutgoingStringValue
:
public
OutgoingValueInterface
{
39
public
:
40
explicit
OutgoingStringValue
(
const
std::string &s);
41
size_t
size()
const
;
42
bool
TransferToSocket(
int
fd,
int
* err)
const
;
43
bool
ToString(std::string *result,
int
* err)
const
;
44
45
private
:
46
const
std::string s_;
47
DISALLOW_COPY_AND_ASSIGN(
OutgoingStringValue
);
48
};
49
50
}
// namespace kinetic
51
52
#endif // KINETIC_CPP_CLIENT_OUTGOING_VALUE_H_
kinetic::OutgoingStringValue
Definition:
outgoing_value.h:38
kinetic
Definition:
blocking_smoketest.cc:26
kinetic::OutgoingValueInterface
Definition:
outgoing_value.h:30
Generated on Mon Mar 30 2015 08:24:47 for Kinetic C/C++ Client by
1.8.8