YCPValueRep representing a block of bytes. More...
#include <YCPByteblock.h>
Public Member Functions | |
| const unsigned char * | value () const |
| long | size () const |
| string | toString () const |
| std::ostream & | toStream (std::ostream &str) const |
| std::ostream & | toXml (std::ostream &str, int indent) const |
| YCPOrder | compare (const YCPByteblock &s) const |
| YCPValueType | valuetype () const |
Protected Member Functions | |
| YCPByteblockRep (const unsigned char *bytes, long len) | |
| YCPByteblockRep (bytecodeistream &str, long len) | |
| ~YCPByteblockRep () | |
Private Attributes | |
| const unsigned char * | bytes |
| long | len |
Friends | |
| class | YCPByteblock |
YCPValueRep representing a block of bytes.
| YCPByteblockRep::YCPByteblockRep | ( | const unsigned char * | bytes, | |
| long | len | |||
| ) | [protected] |
Creates a new YCPByteblockRep object.
| bytes | pointer to a buffer containing the bytes. I'll make me a copy of this, please free the memory yourself, if you need to. | |
| length | length of the byte block. |
References bytes.
| YCPByteblockRep::YCPByteblockRep | ( | bytecodeistream & | str, | |
| long | len | |||
| ) | [protected] |
Creates a new YCPByteblockRep object from a stream. See YCPByteblock (bytecodeistream &) implementation.
References bytes.
| YCPByteblockRep::~YCPByteblockRep | ( | ) | [protected] |
Cleans up
References bytes.
| YCPOrder YCPByteblockRep::compare | ( | const YCPByteblock & | s | ) | const |
Compares two bytes blocks.
References bytes, len, YO_EQUAL, YO_GREATER, and YO_LESS.
| long YCPByteblockRep::size | ( | ) | const |
Returns the number of bytes in the block.
References len.
| std::ostream & YCPByteblockRep::toStream | ( | std::ostream & | str | ) | const [virtual] |
Output value as bytecode to stream
Implements YCPElementRep.
References bytes, len, and Bytecode::writeBytep().
| string YCPByteblockRep::toString | ( | void | ) | const [virtual] |
Returns a string representation of this objects value. Byteblock values are represented in YCP #(byteblockstring), where byteblockstring is some yet to be defined but typical byteblock and date representation.
Implements YCPElementRep.
| std::ostream & YCPByteblockRep::toXml | ( | std::ostream & | str, | |
| int | indent | |||
| ) | const [virtual] |
Implements YCPValueRep.
References bytes, len, and Xmlcode::writeBytep().
| const unsigned char * YCPByteblockRep::value | ( | ) | const |
Returns the bytes of the block.
References bytes.
| YCPValueType YCPByteblockRep::valuetype | ( | ) | const [virtual] |
friend class YCPByteblock [friend] |
const unsigned char* YCPByteblockRep::bytes [private] |
The byte block
Referenced by compare(), toStream(), toString(), toXml(), value(), YCPByteblockRep(), and ~YCPByteblockRep().
long YCPByteblockRep::len [private] |
Length of the byte block
Referenced by compare(), size(), toStream(), toString(), and toXml().
1.6.3