Cthulhu  0.2.10
Cthulhu compiler collection
ctu::json::Array Class Reference

a json array value More...

#include <json.hpp>

Public Member Functions

Json get (size_t index) const
 get a value access a value from the array by index More...
 
Json operator[] (size_t index) const
 get a value same as get More...
 
size_t length () const
 get the length of the array More...
 
ArrayIterator begin () const
 start iterating iterate over the values of the array More...
 
ArrayIterator end () const
 end iterating More...
 

Friends

class Json
 

Detailed Description

a json array value

Definition at line 69 of file json.hpp.

Member Function Documentation

◆ begin()

ArrayIterator Array::begin ( ) const

start iterating iterate over the values of the array

Returns
the start of the iteration

Definition at line 57 of file json.cpp.

◆ end()

ArrayIterator Array::end ( ) const

end iterating

Returns
the end of the iteration

Definition at line 58 of file json.cpp.

◆ get()

Json Array::get ( size_t  index) const

get a value access a value from the array by index

Warning
if the index is out of bounds the function will assert
Parameters
indexthe index to access
Returns
the value at index

Definition at line 53 of file json.cpp.

◆ length()

size_t Array::length ( ) const

get the length of the array

Returns
the length of the array

Definition at line 55 of file json.cpp.

◆ operator[]()

Json Array::operator[] ( size_t  index) const

get a value same as get

Parameters
indexthe index to access
Returns
the value at index

Definition at line 54 of file json.cpp.

Friends And Related Function Documentation

◆ Json

friend class Json
friend

Definition at line 70 of file json.hpp.


The documentation for this class was generated from the following files: