Rudiments
Public Member Functions | List of all members
arraycollection< valuetype > Class Template Referenceabstract

#include <arraycollection.h>

Inherits collection.

Inherited by dynamicarray< valuetype >, and staticarray< valuetype, count >.

Public Member Functions

virtual const chargetType ()
 
virtual valuetypeoperator[] (uint64_t index)=0
 
virtual ssize_t write ()
 
virtual ssize_t write (output *out)
 
virtual ssize_t writeJson ()
 
virtual ssize_t writeJson (bool indent)
 
virtual ssize_t writeJson (output *out)
 
virtual ssize_t writeJson (output *out, bool indent)
 
- Public Member Functions inherited from collection
 collection ()
 
 collection (collection &c)
 
collectionoperator= (collection &c)
 
virtual ~collection ()
 
virtual uint64_t getCount ()=0
 
comparatorgetComparator ()
 
void setComparator (comparator *newcomp)
 
virtual bool isReadOnly ()
 
virtual bool isBlockBased ()
 
virtual uint64_t getBlockSize ()
 
virtual bool isSequentialAccess ()
 
virtual void setManageValues (bool manage)
 
virtual bool getManageValues ()
 
virtual void setManageArrayValues (bool manage)
 
virtual bool getManageArrayValues ()
 
virtual void setManageKeys (bool manage)
 
virtual bool getManageKeys ()
 
virtual void setManageArrayKeys (bool manage)
 
virtual bool getManageArrayKeys ()
 
virtual bool clear ()=0
 
- Public Member Functions inherited from object
virtual ~object ()
 

Detailed Description

template<class valuetype>
class arraycollection< valuetype >

The arraycollection class is the parent class for all rudiments array collections.

Member Function Documentation

◆ getType()

template<class valuetype >
const char * arraycollection< valuetype >::getType ( )
inlinevirtual

Returns "array".

Implements collection.

◆ operator[]()

template<class valuetype >
virtual valuetype & arraycollection< valuetype >::operator[] ( uint64_t index)
pure virtual

Provides read/write access ot the "index"th element of the array.

Implemented in dynamicarray< valuetype >, and staticarray< valuetype, count >.

◆ write() [1/2]

template<class valuetype >
ssize_t arraycollection< valuetype >::write ( )
inlinevirtual

Writes a representation of the arraycollection to standard output.

Implements collection.

◆ write() [2/2]

template<class valuetype >
ssize_t arraycollection< valuetype >::write ( output * out)
inlinevirtual

Writes a representation of the arraycollection to "out".

Implements collection.

◆ writeJson() [1/4]

template<class valuetype >
ssize_t arraycollection< valuetype >::writeJson ( )
inlinevirtual

Writes a JSON representation of the arraycollection to standard output.

Implements collection.

◆ writeJson() [2/4]

template<class valuetype >
ssize_t arraycollection< valuetype >::writeJson ( bool indent)
inlinevirtual

Writes a JSON representation of the arraycollection to standard output.

If "indent" is true, then the output is automatically indented. If "indent" is false, then the tree is written without indentation.

Implements collection.

◆ writeJson() [3/4]

template<class valuetype >
ssize_t arraycollection< valuetype >::writeJson ( output * out)
inlinevirtual

Writes a JSON representation of the arraycollection to "out".

Implements collection.

◆ writeJson() [4/4]

template<class valuetype >
ssize_t arraycollection< valuetype >::writeJson ( output * out,
bool indent )
inlinevirtual

Writes a JSON representation of the arraycollection to "out".

If "indent" is true, then the output is automatically indented. If "indent" is false, then the tree is written without indentation.

Implements collection.