A blackbox wrapper for handling external values in ycp. The payload is handled as a blackbox and is not owned by the wrapper. More...
#include <YCPExternal.h>
Public Member Functions | |
| void * | payload () const |
| string | magic () const |
| string | toString () const |
| std::ostream & | toStream (std::ostream &str) const |
| std::ostream & | toXml (std::ostream &str, int indent) const |
| YCPValueType | valuetype () const |
Protected Member Functions | |
| YCPExternalRep (void *payload, string magic, void(*destructor)(void *, string)=0) | |
| ~YCPExternalRep () | |
Private Attributes | |
| void * | m_payload |
| string | m_magic |
| void(* | m_destructor )(void *, string) |
Friends | |
| class | YCPExternal |
A blackbox wrapper for handling external values in ycp. The payload is handled as a blackbox and is not owned by the wrapper.
| YCPExternalRep::YCPExternalRep | ( | void * | payload, | |
| string | magic, | |||
| void(*)(void *, string) | destructor = 0 | |||
| ) | [protected] |
Creates a new blackbox
| payload | the data stored | |
| magic | the magic identification for external entity to identify its payload |
| YCPExternalRep::~YCPExternalRep | ( | ) | [protected] |
Cleans up
References m_destructor, m_magic, and m_payload.
| string YCPExternalRep::magic | ( | ) | const |
References m_magic.
| void * YCPExternalRep::payload | ( | ) | const |
References m_payload.
| std::ostream & YCPExternalRep::toStream | ( | std::ostream & | str | ) | const [virtual] |
Output value as bytecode to stream Generates an error, because it's not possible to store the data in persistent stream.
Implements YCPElementRep.
References y2error.
| string YCPExternalRep::toString | ( | void | ) | const [virtual] |
| std::ostream & YCPExternalRep::toXml | ( | std::ostream & | str, | |
| int | indent | |||
| ) | const [virtual] |
Implements YCPValueRep.
References y2error.
| YCPValueType YCPExternalRep::valuetype | ( | ) | const [virtual] |
friend class YCPExternal [friend] |
void(* YCPExternalRep::m_destructor)(void *, string) [private] |
Referenced by ~YCPExternalRep().
string YCPExternalRep::m_magic [private] |
Referenced by magic(), toString(), and ~YCPExternalRep().
void* YCPExternalRep::m_payload [private] |
Referenced by payload(), and ~YCPExternalRep().
1.6.3