yast2-core
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
libycp
src
include
ycp
YCPExternal.h
Go to the documentation of this file.
1
/*---------------------------------------------------------------------\
2
| |
3
| __ __ ____ _____ ____ |
4
| \ \ / /_ _/ ___|_ _|___ \ |
5
| \ V / _` \___ \ | | __) | |
6
| | | (_| |___) || | / __/ |
7
| |_|\__,_|____/ |_| |_____| |
8
| |
9
| core system |
10
| (C) SuSE GmbH |
11
\----------------------------------------------------------------------/
12
13
File: YCPExternal.h
14
15
Author: Stanislav Visnovsky <visnov@suse.cz>
16
Maintainer: Stanislav Visnovsky <visnov@suse.cz>
17
18
/-*/
19
// -*- c++ -*-
20
21
#ifndef YCPExternal_h
22
#define YCPExternal_h
23
24
25
#include "
YCPValue.h
"
26
27
33
class
YCPExternalRep
:
public
YCPValueRep
34
{
35
void
*
m_payload
;
36
string
m_magic
;
37
void (*
m_destructor
)(
void
*, string);
38
39
protected
:
40
friend
class
YCPExternal
;
41
49
YCPExternalRep
(
void
*
payload
,
string
magic
,
void
(*destructor)(
void
*,
string
) = 0);
50
54
~YCPExternalRep
();
55
56
public
:
59
void
*
payload
()
const
;
60
63
string
magic
()
const
;
64
68
string
toString
()
const
;
69
75
std::ostream &
toStream
(std::ostream &
str
)
const
;
76
std::ostream &
toXml
(std::ostream &
str
,
int
indent )
const
;
77
81
YCPValueType
valuetype
()
const
;
82
};
83
90
class
YCPExternal
:
public
YCPValue
91
{
92
DEF_COMMON
(External, Value);
93
public
:
94
YCPExternal
(
void
* payload,
string
magic,
void
(*destructor)(
void
*,
string
) = 0)
95
:
YCPValue
(new
YCPExternalRep
(payload, magic, destructor)) {}
96
YCPExternal
(
bytecodeistream
&
str
);
97
};
98
99
#endif // YCPExternal_h
Generated on a sunny day for yast2-core by
1.8.2