Qore Programming Language Reference Manual  0.9.4.2
Pseudo_QC_Hash.dox.h
1 
3 namespace Qore {
5 /***/
6 class <hash> : public <value> {
7 
8 public:
10 
26 bool compareKeys(hash<auto> oh);
27 
28 public:
30 
45 bool complexType();
46 
47 public:
49 
68 
69 public:
71 
83 bool empty();
84 
85 public:
87 
101 *string firstKey();
102 
103 public:
105 
119 auto firstValue();
120 
121 public:
123 
139 bool hasKey(softstring key);
140 
141 public:
143 
159 bool hasKeyValue(softstring key);
160 
161 public:
163 
178 
179 public:
181 
198 
199 public:
201 
215 list<string> keys();
216 
217 public:
219 
233 *string lastKey();
234 
235 public:
237 
251 auto lastValue();
252 
253 public:
255 
270 
271 public:
273 
289 int size();
290 
291 public:
293 
302 bool sizep();
303 
304 public:
306 
322 int typeCode();
323 
324 public:
326 
344 bool val();
345 
346 public:
348 
365 list<auto> values();
366 };
367 }
Qore::HashKeyIterator
This class an iterator class for hashes.
Definition: QC_HashKeyIterator.dox.h:32
<hash>::complexType
bool complexType()
returns True if the hash has a complex type (Hashdecl: Type-Safe Hash Declarations or Hash With Decla...
Qore::HashListIterator
This class an iterator class for hashes of lists as returned by Qore::SQL::Datasource::select() and Q...
Definition: QC_HashListIterator.dox.h:38
<hash>::hasKey
bool hasKey(softstring key)
Returns True if the key exists in the hash (may or may not be assigned a value), False if not.
<hash>::sizep
bool sizep()
Returns True since hashes can return a non-zero size.
<hash>::contextIterator
HashListIterator contextIterator()
Returns a HashListIterator object for the hash.
<hash>::lastValue
auto lastValue()
Returns the value assigned to the last key in the hash if any or NOTHING if the hash has no keys.
<hash>::size
int size()
Returns the number of keys in the hash.
<hash>::val
bool val()
Returns False if the hash has no keys, True if it does.
Qore::HashPairIterator
This class an iterator class for hashes.
Definition: QC_HashPairIterator.dox.h:32
<hash>::pairIterator
HashPairIterator pairIterator()
Returns a HashPairIterator object for the hash.
<hash>::compareKeys
bool compareKeys(hash< auto > oh)
Returns True if the hash argument passed has the same keys in the same order as the current hash,...
<hash>::hasKeyValue
bool hasKeyValue(softstring key)
Returns True if the key exists and is assigned to a value, False if not.
<hash>::values
list< auto > values()
Returns a list of values of the hash.
<hash>::empty
bool empty()
Returns True if the hash has no keys, False if it does.
<value>
Methods in this pseudo-class are available to be executed on any value type (even NOTHING); this is t...
Definition: Pseudo_QC_All.dox.h:6
<hash>::firstKey
*string firstKey()
Returns the first key name in the hash or NOTHING if the hash has no keys.
<hash>::typeCode
int typeCode()
Returns Qore::NT_HASH.
<hash>::iterator
AbstractIterator iterator()
Returns a HashIterator object for the hash.
<hash>::keyIterator
HashKeyIterator keyIterator()
Returns a HashKeyIterator object for the hash.
<hash>::lastKey
*string lastKey()
Returns the last key name in the hash or NOTHING if the hash has no keys.
<hash>::keys
list< string > keys()
Returns a list of key names of the hash.
Qore::AbstractIterator
This class defines an abstract interface for iterators.
Definition: QC_AbstractIterator.dox.h:10
Qore
main Qore-language namespace
Definition: Pseudo_QC_All.dox.h:3
<hash>
Methods in this pseudo-class can be executed on hash values.
Definition: Pseudo_QC_Hash.dox.h:6
<hash>::firstValue
auto firstValue()
Returns the value assigned to the first key in the hash if any or NOTHING if the hash has no keys.