YCPExternalRep Class Reference

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>

Inheritance diagram for YCPExternalRep:

YCPValueRep YCPElementRep

List of all members.

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


Detailed Description

A blackbox wrapper for handling external values in ycp. The payload is handled as a blackbox and is not owned by the wrapper.

Constructor & Destructor Documentation

YCPExternalRep::YCPExternalRep ( void *  payload,
string  magic,
void(*)(void *, string)  destructor = 0 
) [protected]

Creates a new blackbox

Parameters:
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.


Member Function Documentation

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]

Returns an ASCII representation of the payload.

Implements YCPElementRep.

References m_magic.

std::ostream & YCPExternalRep::toXml ( std::ostream &  str,
int  indent 
) const [virtual]

Implements YCPValueRep.

References y2error.

YCPValueType YCPExternalRep::valuetype (  )  const [virtual]

Returns YT_EXTERNAL. See YCPValueRep::valuetype.

Implements YCPValueRep.

References YT_EXTERNAL.


Friends And Related Function Documentation

friend class YCPExternal [friend]


Member Data Documentation

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().


The documentation for this class was generated from the following files:

Generated on a sunny day for yast2-core by doxygen 1.5.9