yast2-core
Public Member Functions | Protected Member Functions | Private Attributes | Friends
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
- Public Member Functions inherited from YCPValueRep
const char * valuetype_str () const
bool isVoid () const
bool isBoolean () const
bool isInteger () const
bool isFloat () const
bool isString () const
bool isByteblock () const
bool isPath () const
bool isSymbol () const
bool isList () const
bool isTerm () const
bool isMap () const
bool isCode () const
bool isBreak () const
bool isReturn () const
bool isEntry () const
bool isReference () const
bool isExternal () const
YCPVoid asVoid () const
YCPBoolean asBoolean () const
YCPInteger asInteger () const
YCPFloat asFloat () const
YCPString asString () const
YCPByteblock asByteblock () const
YCPPath asPath () const
YCPSymbol asSymbol () const
YCPList asList () const
YCPTerm asTerm () const
YCPMap asMap () const
YCPCode asCode () const
YCPEntry asEntry () const
YCPReference asReference () const
YCPExternal asExternal () const
bool equal (const YCPValue &) const
YCPOrder compare (const YCPValue &v, bool rl=false) const
- Public Member Functions inherited from YCPElementRep
YCPValue asValue () const
virtual const YCPElementRepshallowCopy () 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:
payloadthe data stored
magicthe 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 str, and 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 str, and 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.8.1