|
Qore Programming Language
0.9.16
|
34 #ifndef _QORE_QORESTRINGNODE_H
36 #define _QORE_QORESTRINGNODE_H
38 #include <qore/AbstractQoreNode.h>
39 #include <qore/QoreString.h>
58 DLLLOCAL
virtual bool getAsBoolImpl()
const;
59 DLLLOCAL
virtual int getAsIntImpl()
const;
60 DLLLOCAL
virtual int64 getAsBigIntImpl()
const;
61 DLLLOCAL
virtual double getAsFloatImpl()
const;
278 DLLLOCAL
virtual void parseInit(
QoreValue& val, LocalVar* oflag,
int pflag,
int& lvids,
const QoreTypeInfo*& typeInfo);
284 DLLLOCAL QoreStringNodeMaker(
const QoreStringNodeMaker& str);
287 DLLLOCAL QoreStringNodeMaker&
operator=(
const QoreStringNodeMaker&);
290 DLLEXPORT QoreStringNodeMaker(
const char* fmt, ...);
314 DLLLOCAL
void*
operator new(size_t);
413 DLLLOCAL
void*
operator new(size_t);
464 #include <qore/ReferenceHolder.h>
496 DLLLOCAL
void*
operator new(size_t);
DLLEXPORT QoreStringNode * reverse() const
return a QoreStringNode with the characters reversed
DLLEXPORT char * giveBuffer()
returns the character buffer and leaves the QoreString empty, the caller owns the memory returned (mu...
virtual DLLLOCAL void parseInit(QoreValue &val, LocalVar *oflag, int pflag, int &lvids, const QoreTypeInfo *&typeInfo)
returns the type information
const DLLLOCAL QoreString * operator*()
returns the object being managed
Definition: QoreStringNode.h:354
virtual DLLEXPORT ~QoreStringNode()
destructor only called when references = 0, use deref() instead
static DLLEXPORT QoreStringNode * createAndConvertEncoding(const char *str, const QoreEncoding *from, const QoreEncoding *to, ExceptionSink *xsink)
creates a new QoreStringNode from a string and converts its encoding
DLLEXPORT int getAsString(QoreString &str, int format_offset, ExceptionSink *xsink) const
concatenates the string data in double quotes to an existing QoreString
const DLLLOCAL QoreString * operator*()
returns the object being managed
Definition: QoreStringNode.h:518
this class is used to safely manage calls to AbstractQoreNode::getStringRepresentation() when a QoreS...
Definition: QoreStringNode.h:401
intptr_t qore_offset_t
used for offsets that could be negative
Definition: common.h:76
const DLLEXPORT QoreEncoding * QCS_DEFAULT
the default encoding for the Qore library
DLLEXPORT QoreStringNode * stringRefSelf() const
references the object and returns a non-const pointer to "this"
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:262
DLLLOCAL QoreStringValueHelper(const QoreStringValueHelper &)
this function is not implemented; it is here as a private function in order to prohibit it from being...
virtual const DLLEXPORT char * getTypeName() const
returns the type name as a c string
DLLLOCAL bool is_temp() const
returns true if the pointer being managed is temporary
Definition: QoreStringNode.h:388
safely manages the return values to AbstractQoreNode::getAsString(), stack only, cannot be dynamicall...
Definition: QoreStringNode.h:484
this class is used to safely manage calls to AbstractQoreNode::getStringRepresentation() when a simpl...
Definition: QoreStringNode.h:302
size_t qore_size_t
used for sizes (same range as a pointer)
Definition: common.h:73
DLLLOCAL QoreString * giveString()
returns a copy of the QoreString that the caller owns
Definition: QoreStringNode.h:360
DLLLOCAL QoreStringValueHelper & operator=(const QoreStringValueHelper &)
this function is not implemented; it is here as a private function in order to prohibit it from being...
long long int64
64bit integer type, cannot use int64_t here since it breaks the API on some 64-bit systems due to equ...
Definition: common.h:260
Qore's string type supported by the QoreEncoding class.
Definition: QoreString.h:81
DLLEXPORT QoreStringNode * substr(qore_offset_t offset, ExceptionSink *xsink) const
returns a new string consisting of all the characters from the current string starting with character...
DLLEXPORT QoreStringNode()
creates an empty string and assigns the default encoding QCS_DEFAULT
static const DLLLOCAL char * getStaticTypeName()
returns the type name (useful in templates)
Definition: QoreStringNode.h:266
const DLLLOCAL QoreStringNode * operator->()
returns the object being managed
Definition: QoreStringNode.h:443
const qore_type_t NT_STRING
type value for QoreStringNode
Definition: node_types.h:45
base class for simple value types
Definition: AbstractQoreNode.h:366
const DLLEXPORT char * getBuffer() const
returns the string's buffer; this data should not be changed
DLLEXPORT ~QoreStringNodeValueHelper()
destroys the object and dereferences the QoreStringNode if it is a temporary pointer
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
DLLEXPORT QoreString * copy() const
returns an exact copy of the string
DLLEXPORT QoreStringNode * extract(qore_offset_t offset, ExceptionSink *xsink)
removes characters from the string starting at position "offset" and returns a string of the characte...
DLLLOCAL ~QoreStringValueHelper()
destroys the object and deletes the QoreString pointer being managed if it was a temporary pointer
Definition: QoreStringNode.h:339
DLLLOCAL bool is_temp() const
returns true if the referenced being managed is temporary
Definition: QoreStringNode.h:459
virtual DLLEXPORT bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values for container types) without type o...
DLLEXPORT QoreStringNode * convertEncoding(const QoreEncoding *nccs, ExceptionSink *xsink) const
converts the encoding of the string to the specified encoding, returns 0 if an error occurs,...
virtual DLLEXPORT QoreString * getStringRepresentation(bool &del) const
returns the current string and sets del to false
static DLLLOCAL qore_type_t getStaticTypeCode()
returns the type code (useful in templates)
Definition: QoreStringNode.h:271
DLLEXPORT QoreStringNode * getReferencedValue()
returns a referenced value - the caller will own the reference
DLLLOCAL char * giveBuffer()
returns a char* string that the caller owns and must free()
Definition: QoreStringNode.h:375
Holds absolute and relative date/time values in Qore with precision to the microsecond.
Definition: DateTime.h:93
DLLEXPORT qore_size_t length() const
returns the number of characters (not bytes) in the string
DLLEXPORT QoreStringNode * parseBase64ToString(ExceptionSink *xsink) const
parses the string as a base64-encoded binary and returns the decoded value as a QoreStringNode
virtual DLLEXPORT bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values for container types) with possible ...
DLLEXPORT QoreString & operator=(const QoreString &other)
assigns the value of one string to another
virtual DLLEXPORT DateTime * getDateTimeRepresentation(bool &del) const
returns the DateTime representation of this string
DLLEXPORT ~QoreNodeAsStringHelper()
destroys the object and deletes the QoreString pointer being managed if it was a temporary pointer
DLLEXPORT QoreString * giveString()
returns a copy of the QoreString that the caller owns
const DLLLOCAL QoreString * operator->()
returns the object being managed
Definition: QoreStringNode.h:512
virtual DLLEXPORT AbstractQoreNode * realCopy() const
returns a copy of the object, the caller owns the reference count
defines string encoding functions in Qore
Definition: QoreEncoding.h:83
holds arbitrary binary data
Definition: BinaryNode.h:41
DLLLOCAL void setup(ExceptionSink *xsink, const QoreValue n, const QoreEncoding *enc=0)
sets up the object / common initialization
const DLLLOCAL QoreString * operator->()
returns the object being managed
Definition: QoreStringNode.h:348
Qore's string value type, reference counted, dynamically-allocated only.
Definition: QoreStringNode.h:50
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:54
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode)
Definition: common.h:70
const DLLLOCAL QoreStringNode * operator*()
returns the object being managed
Definition: QoreStringNode.h:449