32 #ifndef _QORE_BINARYNODE_H
34 #define _QORE_BINARYNODE_H
36 #include <qore/AbstractQoreNode.h>
50 DLLLOCAL BinaryNode& operator=(
const BinaryNode&);
113 DLLEXPORT
int compare(
const BinaryNode *obj)
const;
119 DLLEXPORT
bool empty()
const;
125 DLLEXPORT BinaryNode *
copy()
const;
128 DLLEXPORT
const void *
getPtr()
const;
134 DLLEXPORT
void append(
const BinaryNode *b);
137 DLLEXPORT
void append(
const BinaryNode &b);
207 DLLEXPORT
void clear();
222 #endif // _QORE_BINARYNODE_H
const qore_type_t NT_BINARY
type value for BinaryNode
Definition: node_types.h:49
DLLEXPORT int compare(const BinaryNode *obj) const
returns 0 = equal, 1 = not equal
virtual DLLEXPORT bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality
DLLEXPORT qore_size_t size() const
returns the number of bytes in the object
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:55
DLLEXPORT void prepend(const void *nptr, qore_size_t size)
resizes the object and prepends a copy of the data passed to the beginning of the object ...
size_t qore_size_t
used for sizes (same range as a pointer)
Definition: common.h:70
long qore_offset_t
used for offsets that could be negative
Definition: common.h:73
virtual DLLEXPORT bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality
virtual DLLEXPORT class AbstractQoreNode * realCopy() const
returns a copy of the object; the caller owns the reference count
DLLEXPORT int preallocate(qore_size_t size)
pre-allocates a buffer of a certain size
signed short qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:67
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:50
DLLEXPORT void splice(qore_offset_t offset, qore_offset_t length, BinaryNode *extract=0)
removes "length" characters from the binary data starting at position "offset"
DLLEXPORT int setSize(qore_size_t size)
sets the buffer size after preallocation
virtual DLLEXPORT ~BinaryNode()
frees and memory owned by the object
virtual DLLLOCAL AbstractQoreNode * parseInit(LocalVar *oflag, int pflag, int &lvids, const QoreTypeInfo *&typeInfo)
returns the type information
DLLEXPORT bool empty() const
returns true if empty
DLLEXPORT void clear()
frees any managed memory and sets the size to 0
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:43
manages a reference count of a pointer to a class that takes a simple "deref()" call with no argument...
Definition: ReferenceHolder.h:111
DLLEXPORT int substr(BinaryNode &b, qore_offset_t offset) const
copies data to the BinaryNode argument starting with byte position "offset"
DLLEXPORT void * giveBuffer()
returns the data being managed and leaves this object empty
virtual DLLEXPORT const char * getTypeName() const
returns the type name as a c string
static DLLLOCAL const char * getStaticTypeName()
returns the type name (useful in templates)
Definition: BinaryNode.h:210
static DLLLOCAL qore_type_t getStaticTypeCode()
returns the type code (useful in templates)
Definition: BinaryNode.h:215
base class for simple value types
Definition: AbstractQoreNode.h:425
virtual DLLEXPORT bool getAsBoolImpl() const
returns false unless perl-boolean-evaluation is enabled, in which case it returns false only when emp...
DLLEXPORT BinaryNode * copy() const
returns a copy of the object
virtual DLLEXPORT int getAsString(QoreString &str, int foff, class ExceptionSink *xsink) const
concatenate the verbose string representation of the value to an existing QoreString ...
DLLEXPORT const void * getPtr() const
returns the pointer to the data
DLLEXPORT void append(const void *nptr, qore_size_t size)
resizes the object and appends a copy of the data passed to the object
holds arbitrary binary data
Definition: BinaryNode.h:41