QoreHashNode.h
/* -*- mode: c++; indent-tabs-mode: nil -*- */
/*
QoreHashNode.h
Qore Programming Language
Copyright (C) 2003 - 2021 Qore Technologies, s.r.o.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
Note that the Qore library is released under a choice of three open-source
licenses: MIT (as above), LGPL 2+, or GPL 2+; see README-LICENSE for more
information.
*/
#ifndef _QORE_QOREHASHNODE_H
#define _QORE_QOREHASHNODE_H
#include <qore/AbstractQoreNode.h>
#include <qore/common.h>
class LocalVar;
class QoreString;
class TypedHashDecl;
class QoreHashNode : public AbstractQoreNode {
friend class HashIterator;
friend class ReverseHashIterator;
friend class ConstHashIterator;
friend class ReverseConstHashIterator;
friend class HashAssignmentHelper;
friend class hash_assignment_priv;
friend class qore_object_private;
friend class qore_hash_private;
private:
DLLLOCAL QoreHashNode(const QoreHashNode&);
DLLLOCAL QoreHashNode& operator=(const QoreHashNode&);
protected:
class qore_hash_private *priv;
DLLEXPORT virtual bool derefImpl(ExceptionSink* xsink);
DLLLOCAL virtual QoreValue evalImpl(bool &needs_deref, ExceptionSink* xsink) const;
DLLEXPORT virtual ~QoreHashNode();
public:
DLLEXPORT QoreHashNode();
DLLEXPORT QoreHashNode(const TypedHashDecl* hd, ExceptionSink* xsink);
DLLEXPORT QoreHashNode(const QoreTypeInfo* valueTypeInfo);
DLLEXPORT virtual bool getAsBoolImpl() const;
DLLEXPORT virtual int getAsString(QoreString& str, int foff, ExceptionSink* xsink) const;
DLLEXPORT virtual QoreString* getAsString(bool &del, int foff, ExceptionSink* xsink) const;
DLLEXPORT virtual AbstractQoreNode* realCopy() const;
DLLEXPORT virtual bool is_equal_soft(const AbstractQoreNode* v, ExceptionSink* xsink) const;
DLLEXPORT virtual bool is_equal_hard(const AbstractQoreNode* v, ExceptionSink* xsink) const;
DLLEXPORT virtual const char* getTypeName() const;
DLLEXPORT QoreHashNode* hashRefSelf() const;
DLLEXPORT const char* getFirstKey() const;
DLLEXPORT const char* getLastKey() const;
DLLEXPORT QoreValue getKeyValueExistence(const char* key, bool& exists, ExceptionSink* xsink) const;
DLLEXPORT QoreValue getKeyValueExistence(const char* key, bool& exists) const;
DLLEXPORT QoreValue getKeyValue(const char* key, ExceptionSink* xsink) const;
DLLEXPORT QoreValue getKeyValue(const char* key) const;
DLLEXPORT QoreValue getKeyValueExistence(const QoreString& key, bool& exists, ExceptionSink* xsink) const;
DLLEXPORT QoreValue getKeyValueExistence(const QoreString& key, bool& exists) const;
DLLEXPORT QoreValue getKeyValue(const QoreString& key, ExceptionSink* xsink) const;
DLLEXPORT int64 getKeyAsBigInt(const char* key, bool &found) const;
DLLEXPORT bool getKeyAsBool(const char* key, bool &found) const;
DLLEXPORT QoreHashNode* copy() const;
DLLEXPORT QoreValue& getKeyValueReference(const char* key);
DLLEXPORT void merge(const QoreHashNode* h, ExceptionSink* xsink);
DLLEXPORT int setKeyValue(const char* key, QoreValue value, ExceptionSink* xsink);
DLLEXPORT int setKeyValue(const QoreString& key, QoreValue value, ExceptionSink* xsink);
DLLEXPORT void deleteKey(const QoreString* key, ExceptionSink* xsink);
DLLEXPORT void deleteKey(const char* key, ExceptionSink* xsink);
DLLEXPORT QoreValue takeKeyValue(const char* key);
DLLEXPORT QoreListNode* getKeys() const;
DLLEXPORT QoreListNode* getValues() const;
DLLEXPORT bool compareSoft(const QoreHashNode* h, ExceptionSink* xsink) const;
DLLEXPORT bool compareHard(const QoreHashNode* h, ExceptionSink* xsink) const;
DLLEXPORT size_t size() const;
DLLEXPORT bool empty() const;
DLLEXPORT bool existsKey(const char* key) const;
DLLEXPORT bool existsKeyValue(const char* key) const;
DLLEXPORT void removeKey(const QoreString* key, ExceptionSink* xsink);
DLLEXPORT void removeKey(const char* key, ExceptionSink* xsink);
DLLEXPORT const TypedHashDecl* getHashDecl() const;
DLLEXPORT const QoreTypeInfo* getValueTypeInfo() const;
DLLEXPORT const QoreTypeInfo* getTypeInfo() const;
DLLLOCAL static const char* getStaticTypeName() {
return "hash";
}
DLLLOCAL static qore_type_t getStaticTypeCode() {
return NT_HASH;
}
static const qore_type_t TYPE = NT_HASH;
DLLLOCAL virtual int parseInit(QoreValue& val, QoreParseContext& parse_context);
DLLLOCAL QoreHashNode(bool ne);
DLLLOCAL void clear(ExceptionSink* xsink, bool reverse = false);
DLLLOCAL void clearNeedsEval();
DLLLOCAL void setNeedsEval();
// returns a new hash consisting of just the members of value_list
DLLLOCAL QoreHashNode* getSlice(const QoreListNode* value_list, ExceptionSink* xsink) const;
};
#include <qore/ReferenceHolder.h>
typedef ReferenceHolder<QoreHashNode> QoreHashNodeHolder;
class qhi_priv;
class HashIterator {
friend class HashAssignmentHelper;
friend class qhi_priv;
protected:
QoreHashNode* h;
qhi_priv* priv;
DLLLOCAL HashIterator(const HashIterator&);
DLLLOCAL HashIterator& operator=(const HashIterator&);
DLLLOCAL void* operator new(size_t);
public:
DLLEXPORT HashIterator(QoreHashNode* h);
DLLEXPORT HashIterator(QoreHashNode& h);
DLLEXPORT ~HashIterator();
DLLEXPORT bool next();
DLLEXPORT bool prev();
DLLEXPORT const char* getKey() const;
DLLEXPORT QoreString* getKeyString() const;
DLLEXPORT QoreValue get() const;
DLLEXPORT const QoreTypeInfo* getTypeInfo() const;
DLLEXPORT void deleteKey(ExceptionSink* xsink);
DLLEXPORT QoreValue removeKeyValue();
DLLEXPORT QoreValue getReferenced() const;
DLLEXPORT QoreHashNode* getHash() const;
DLLEXPORT bool first() const;
DLLEXPORT bool last() const;
DLLEXPORT bool empty() const;
DLLEXPORT bool valid() const;
};
class ReverseHashIterator : public HashIterator {
public:
DLLEXPORT ReverseHashIterator(QoreHashNode* h);
DLLEXPORT ReverseHashIterator(QoreHashNode& h);
DLLEXPORT ~ReverseHashIterator();
DLLEXPORT bool next();
DLLEXPORT bool prev();
DLLEXPORT bool first() const;
DLLEXPORT bool last() const;
};
class ConstHashIterator {
protected:
const QoreHashNode* h;
qhi_priv* priv;
DLLLOCAL ConstHashIterator& operator=(const HashIterator&);
public:
DLLEXPORT ConstHashIterator(const QoreHashNode* h);
DLLEXPORT ConstHashIterator(const QoreHashNode& h);
DLLLOCAL ConstHashIterator(const ConstHashIterator&);
DLLEXPORT ~ConstHashIterator();
DLLEXPORT bool next();
DLLEXPORT bool prev();
DLLEXPORT const char* getKey() const;
DLLEXPORT QoreString* getKeyString() const;
DLLEXPORT const QoreValue get() const;
DLLEXPORT const QoreTypeInfo* getTypeInfo() const;
DLLEXPORT QoreValue getReferenced() const;
DLLEXPORT const QoreHashNode* getHash() const;
DLLEXPORT bool first() const;
DLLEXPORT bool last() const;
DLLEXPORT bool empty() const;
DLLEXPORT bool valid() const;
DLLEXPORT void reset();
};
class ReverseConstHashIterator : public ConstHashIterator {
public:
DLLEXPORT ReverseConstHashIterator(const QoreHashNode* h);
DLLEXPORT ReverseConstHashIterator(const QoreHashNode& h);
DLLEXPORT ~ReverseConstHashIterator();
DLLEXPORT bool next();
DLLEXPORT bool prev();
DLLEXPORT bool first() const;
DLLEXPORT bool last() const;
};
class HashAssignmentHelper {
friend class hash_assignment_priv;
public:
DLLEXPORT HashAssignmentHelper(QoreHashNode& n_h, const char* key, bool must_already_exist = false);
DLLEXPORT HashAssignmentHelper(QoreHashNode& n_h, const std::string& key, bool must_already_exist = false);
DLLEXPORT HashAssignmentHelper(ExceptionSink* xsink, QoreHashNode& n_h, const QoreString& key, bool must_already_exist = false);
DLLEXPORT HashAssignmentHelper(ExceptionSink* xsink, QoreHashNode& n_h, const QoreString* key, bool must_already_exist = false);
DLLEXPORT HashAssignmentHelper(HashIterator &hi);
DLLEXPORT ~HashAssignmentHelper();
DLLEXPORT void reassign(const char* key, bool must_already_exist = false);
DLLEXPORT void reassign(const std::string& key, bool must_already_exist = false);
DLLEXPORT operator bool() const;
DLLEXPORT void assign(QoreValue v, ExceptionSink* xsink);
DLLEXPORT QoreValue swap(QoreValue v, ExceptionSink* xsink);
DLLEXPORT QoreValue get() const;
DLLEXPORT QoreValue operator*() const;
protected:
class hash_assignment_priv *priv;
private:
DLLLOCAL HashAssignmentHelper(const HashAssignmentHelper&) = delete;
DLLLOCAL HashAssignmentHelper& operator=(const HashAssignmentHelper&) = delete;
DLLLOCAL void* operator new(size_t) = delete;
};
#endif // _QORE_HASH_H
QoreHashNode::compareSoft
DLLEXPORT bool compareSoft(const QoreHashNode *h, ExceptionSink *xsink) const
does a deep "soft" compare of all hash elements (types may be converted for the comparison) and retur...
QoreHashNode::derefImpl
virtual DLLEXPORT bool derefImpl(ExceptionSink *xsink)
dereferences all elements of the hash
HashIterator::~HashIterator
DLLEXPORT ~HashIterator()
Destroys the iterator.
QoreHashNode::getKeyAsBigInt
DLLEXPORT int64 getKeyAsBigInt(const char *key, bool &found) const
returns the value of the key as an int64
ConstHashIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is currently pointing at a valid element
HashIterator::first
DLLEXPORT bool first() const
returns true if on the first key of the hash
HashAssignmentHelper::operator*
DLLEXPORT QoreValue operator*() const
returns the current value of the hash key; any pointer returned is still owned by the hash ...
ConstHashIterator::prev
DLLEXPORT bool prev()
moves to the previous element, returns false when there are no more elements to iterate ...
HashIterator::empty
DLLEXPORT bool empty() const
returns true if the hash is empty
QoreHashNode
This is the hash or associative list container type in Qore, dynamically allocated only...
Definition: QoreHashNode.h:50
ConstHashIterator::getTypeInfo
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns the type info for the current value
ConstHashIterator::getKeyString
DLLEXPORT QoreString * getKeyString() const
returns a QoreString for the current key, the caller owns QoreString returned
HashAssignmentHelper
use this class to make assignments to hash keys from a pointer to the key value
Definition: QoreHashNode.h:671
QoreHashNode::getValues
DLLEXPORT QoreListNode * getValues() const
returns a QoreListNode of AbstractQoreNode pointers representing all values in the hash; caller owns ...
QoreHashNode::getKeyAsBool
DLLEXPORT bool getKeyAsBool(const char *key, bool &found) const
returns the value of the key as a bool
ReverseConstHashIterator::ReverseConstHashIterator
DLLEXPORT ReverseConstHashIterator(const QoreHashNode *h)
initializes the iterator with the passed hash
ReverseHashIterator::last
DLLEXPORT bool last() const
returns true if on the first key of the hash
ReverseConstHashIterator::next
DLLEXPORT bool next()
moves to the next element in reverse order, returns false when there are no more elements to iterate ...
ReverseHashIterator
reverse iterator class for QoreHashNode, to be only created on the stack
Definition: QoreHashNode.h:523
QoreHashNode::~QoreHashNode
virtual DLLEXPORT ~QoreHashNode()
deletes the object, cannot be called directly (use deref(ExceptionSink*) instead) ...
HashIterator::next
DLLEXPORT bool next()
moves to the next element, returns false when there are no more elements to iterate ...
HashAssignmentHelper::HashAssignmentHelper
DLLEXPORT HashAssignmentHelper(QoreHashNode &n_h, const char *key, bool must_already_exist=false)
constructor taking a const char*
QoreHashNode::is_equal_soft
virtual DLLEXPORT bool is_equal_soft(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values) with possible type conversion (sof...
QoreHashNode::compareHard
DLLEXPORT bool compareHard(const QoreHashNode *h, ExceptionSink *xsink) const
does a deep "hard" compare of all hash elements (no type conversions are performed) and returns true ...
AbstractQoreNode
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:57
QoreHashNode::merge
DLLEXPORT void merge(const QoreHashNode *h, ExceptionSink *xsink)
appends all key-value pairs of "h" to this hash
HashIterator::last
DLLEXPORT bool last() const
returns true if on the last key of the hash
QoreHashNode::setKeyValue
DLLEXPORT int setKeyValue(const char *key, QoreValue value, ExceptionSink *xsink)
sets the value of "key" to "value"
HashIterator::deleteKey
DLLEXPORT void deleteKey(ExceptionSink *xsink)
deletes the key from the hash and dereferences the value
QoreHashNode::getStaticTypeCode
static DLLLOCAL qore_type_t getStaticTypeCode()
returns the type code (useful in templates)
Definition: QoreHashNode.h:391
HashIterator::getHash
DLLEXPORT QoreHashNode * getHash() const
returns the hash
QoreHashNode::getFirstKey
DLLEXPORT const char * getFirstKey() const
returns the cstring value of the first key in the hash
ConstHashIterator::first
DLLEXPORT bool first() const
returns true if on the first key of the hash
ConstHashIterator::ConstHashIterator
DLLEXPORT ConstHashIterator(const QoreHashNode *h)
initializes the iterator with the passed hash
ConstHashIterator::getReferenced
DLLEXPORT QoreValue getReferenced() const
returns the value of the current key with an incremented reference count
QoreHashNode::evalImpl
virtual DLLLOCAL QoreValue evalImpl(bool &needs_deref, ExceptionSink *xsink) const
optionally evaluates the argument
QoreHashNode::hashRefSelf
DLLEXPORT QoreHashNode * hashRefSelf() const
returns "this" with an incremented reference count
HashIterator::getKeyString
DLLEXPORT QoreString * getKeyString() const
returns a QoreString for the current key, the caller owns QoreString returned
ConstHashIterator::getKey
DLLEXPORT const char * getKey() const
returns the current key
HashAssignmentHelper::swap
DLLEXPORT QoreValue swap(QoreValue v, ExceptionSink *xsink)
swaps the current value with the new value of the hash key, assumes that the new value is already ref...
HashAssignmentHelper::assign
DLLEXPORT void assign(QoreValue v, ExceptionSink *xsink)
assigns a value to the hash key, dereferences any old value, assumes that the value is already refere...
ConstHashIterator::~ConstHashIterator
DLLEXPORT ~ConstHashIterator()
Destroys the iterator.
QoreHashNode::getAsString
virtual DLLEXPORT int getAsString(QoreString &str, int foff, ExceptionSink *xsink) const
concatenate the verbose string representation of the list (including all contained values) to an exis...
QoreHashNode::priv
class qore_hash_private * priv
private implementation of the class
Definition: QoreHashNode.h:69
ConstHashIterator::reset
DLLEXPORT void reset()
resets the iterator to its initial state
ReverseHashIterator::next
DLLEXPORT bool next()
moves to the next element in reverse order, returns false when there are no more elements to iterate ...
QoreString
Qore&#39;s string type supported by the QoreEncoding class.
Definition: QoreString.h:81
HashAssignmentHelper::~HashAssignmentHelper
DLLEXPORT ~HashAssignmentHelper()
destroys the object and does post processing on the new value
QoreHashNode::getValueTypeInfo
DLLEXPORT const QoreTypeInfo * getValueTypeInfo() const
returns the value type declaration (only possible if there is no hashdecl set)
QoreHashNode::getHashDecl
DLLEXPORT const TypedHashDecl * getHashDecl() const
returns the hash&#39;s type declaration, if any
ReverseHashIterator::prev
DLLEXPORT bool prev()
moves to the previous element in reverse order, returns false when there are no more elements to iter...
QoreListNode
This is the list container type in Qore, dynamically allocated only, reference counted.
Definition: QoreListNode.h:52
QoreHashNode::getTypeInfo
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns the type info structure for the current value; also works for hashes derived from a TypedHash...
QoreHashNode::parseInit
virtual DLLLOCAL int parseInit(QoreValue &val, QoreParseContext &parse_context)
initializes during parsing
ReverseConstHashIterator::last
DLLEXPORT bool last() const
returns true if on the first key of the hash
HashIterator::prev
DLLEXPORT bool prev()
moves to the previous element, returns false when there are no more elements to iterate ...
HashIterator::getReferenced
DLLEXPORT QoreValue getReferenced() const
returns the value of the current key with an incremented reference count
QoreHashNode::realCopy
virtual DLLEXPORT AbstractQoreNode * realCopy() const
performs a copy of the hash and returns the new hash
NT_HASH
const qore_type_t NT_HASH
type value for QoreHashNode
Definition: node_types.h:51
QoreHashNode::takeKeyValue
DLLEXPORT QoreValue takeKeyValue(const char *key)
removes the value from the hash and returns the value removed, if any
QoreHashNode::getKeyValue
DLLEXPORT QoreValue getKeyValue(const char *key, ExceptionSink *xsink) const
returns the value of the given key
HashIterator::HashIterator
DLLLOCAL HashIterator(const HashIterator &)
this function is not implemented; it is here as a private function in order to prohibit it from being...
QoreHashNode::existsKeyValue
DLLEXPORT bool existsKeyValue(const char *key) const
returns true if the hash contains the given key and the key has a value (i.e. is not NOTHING) ...
QoreValue
The main value class in Qore, designed to be passed by value.
Definition: QoreValue.h:267
QoreHashNode::getKeyValueExistence
DLLEXPORT QoreValue getKeyValueExistence(const char *key, bool &exists, ExceptionSink *xsink) const
returns the value of the given key
QoreHashNode::clearNeedsEval
DLLLOCAL void clearNeedsEval()
sets "needs_eval" to false and "value" to true
ConstHashIterator::empty
DLLEXPORT bool empty() const
returns true if the hash is empty
QoreHashNode::empty
DLLEXPORT bool empty() const
returns true if the hash has no members, false if not
ReverseConstHashIterator::prev
DLLEXPORT bool prev()
moves to the previous element in reverse order, returns false when there are no more elements to iter...
ExceptionSink
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:48
QoreHashNode::removeKey
DLLEXPORT void removeKey(const QoreString *key, ExceptionSink *xsink)
removes the given key from the hash and derefences its value, if any
HashIterator::operator=
DLLLOCAL HashIterator & operator=(const HashIterator &)
this function is not implemented; it is here as a private function in order to prohibit it from being...
HashIterator::removeKeyValue
DLLEXPORT QoreValue removeKeyValue()
removes the key value and returns the value returned
HashIterator::valid
DLLEXPORT bool valid() const
returns true if the iterator is currently pointing at a valid element
QoreHashNode::size
DLLEXPORT size_t size() const
returns the number of members in the hash, executes in constant time
ReverseConstHashIterator
reverse constant iterator class for QoreHashNode, to be only created on the stack ...
Definition: QoreHashNode.h:640
QoreHashNode::getStaticTypeName
static DLLLOCAL const char * getStaticTypeName()
returns the type name (useful in templates)
Definition: QoreHashNode.h:386
int64
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
QoreHashNode::deleteKey
DLLEXPORT void deleteKey(const QoreString *key, ExceptionSink *xsink)
performs a delete operation on the value of the given key
QoreHashNode::getLastKey
DLLEXPORT const char * getLastKey() const
returns the cstring value of the last key in the hash
ReverseHashIterator::first
DLLEXPORT bool first() const
returns true if on the last key of the hash
QoreHashNode::getTypeName
virtual DLLEXPORT const char * getTypeName() const
returns the type name as a c string
TypedHashDecl
typed hash declaration
Definition: TypedHashDecl.h:44
QoreHashNode::getKeys
DLLEXPORT QoreListNode * getKeys() const
returns a QoreListNode of QoreStringNode pointers representing all keys in the hash, caller owns the reference count returned
ReverseConstHashIterator::first
DLLEXPORT bool first() const
returns true if on the last key of the hash
HashAssignmentHelper::reassign
DLLEXPORT void reassign(const char *key, bool must_already_exist=false)
reassigns the object to the given key for a new assignment
ConstHashIterator::operator=
DLLLOCAL ConstHashIterator & operator=(const HashIterator &)
this function is not implemented; it is here as a protected function in order to prohibit it from bei...
QoreHashNode::setNeedsEval
DLLLOCAL void setNeedsEval()
sets "needs_eval" to true and "value" to false
QoreHashNode::copy
DLLEXPORT QoreHashNode * copy() const
performs a copy of the hash and returns the new hash
qore_type_t
int16_t qore_type_t
used to identify unique Qore data and parse types (descendents of AbstractQoreNode) ...
Definition: common.h:70
ConstHashIterator::getHash
DLLEXPORT const QoreHashNode * getHash() const
returns the hash
AbstractQoreNode::value
bool value
this is true for values, if false then either the type needs evaluation to produce a value or is a pa...
Definition: AbstractQoreNode.h:330
ConstHashIterator
constant iterator class for QoreHashNode, to be only created on the stack
Definition: QoreHashNode.h:563
common.h
ReverseConstHashIterator::~ReverseConstHashIterator
DLLEXPORT ~ReverseConstHashIterator()
Destroys the iterator.
HashAssignmentHelper::priv
class hash_assignment_priv * priv
private implementation
Definition: QoreHashNode.h:764
ConstHashIterator::last
DLLEXPORT bool last() const
returns true if on the last key of the hash
QoreHashNode::QoreHashNode
DLLEXPORT QoreHashNode()
creates an empty hash
QoreHashNode::is_equal_hard
virtual DLLEXPORT bool is_equal_hard(const AbstractQoreNode *v, ExceptionSink *xsink) const
tests for equality ("deep compare" including all contained values) without type conversions (hard com...
QoreHashNode::existsKey
DLLEXPORT bool existsKey(const char *key) const
returns true if the hash contains the given key
HashIterator::getKey
DLLEXPORT const char * getKey() const
returns the current key
ReverseHashIterator::ReverseHashIterator
DLLEXPORT ReverseHashIterator(QoreHashNode *h)
initializes the iterator with the passed hash
HashIterator::getTypeInfo
DLLEXPORT const QoreTypeInfo * getTypeInfo() const
returns the type info for the current value
QoreHashNode::getAsBoolImpl
virtual DLLEXPORT bool getAsBoolImpl() const
returns false unless perl-boolean-evaluation is enabled, in which case it returns false only when emp...
ReverseHashIterator::~ReverseHashIterator
DLLEXPORT ~ReverseHashIterator()
Destroys the iterator.
ConstHashIterator::next
DLLEXPORT bool next()
moves to the next element, returns false when there are no more elements to iterate ...
ReferenceHolder
a templated class to manage a reference count of an object that can throw a Qore-language exception w...
Definition: ReferenceHolder.h:52
HashIterator
iterator class for QoreHashNode, to be only created on the stack
Definition: QoreHashNode.h:433