JODA  0.13.1 (59b41972)
JSON On-Demand Analysis
Public Member Functions | Static Public Member Functions | Protected Attributes
RapidJsonDocument Class Reference

#include <RapidJsonDocument.h>

Collaboration diagram for RapidJsonDocument:
[legend]

Public Member Functions

 RapidJsonDocument (unsigned long id, std::unique_ptr< RJDocument > &&json, std::unique_ptr< const IOrigin > &&origin)
 
 RapidJsonDocument (std::unique_ptr< RJDocument > &&json, std::unique_ptr< const IOrigin > &&origin)
 
 ~RapidJsonDocument ()=default
 
 RapidJsonDocument (RapidJsonDocument &&doc) noexcept=default
 
RapidJsonDocumentoperator= (RapidJsonDocument &&other) noexcept=default
 
 RapidJsonDocument (const RapidJsonDocument &doc)=delete
 
RapidJsonDocumentoperator= (const RapidJsonDocument &other)=delete
 
 RapidJsonDocument ()
 
const std::unique_ptr< RJDocument > & getJson () const
 
void setJson (std::unique_ptr< RJDocument > &&json)
 
void setOrigin (std::unique_ptr< const IOrigin > &&orig)
 
void removeDoc ()
 
unsigned long getId () const
 
bool isValid () const
 
bool isView () const
 
void setView (std::unique_ptr< ViewLayer > &&view)
 
const std::unique_ptr< ViewLayer > & getView () const
 
RJValue const * Get (const RJPointer &ptr) const
 
const std::unique_ptr< const IOrigin > & getOrigin () const
 
template<typename Handler >
bool Accept (Handler &handler) const
 

Static Public Member Functions

static DOC_ID getNewID ()
 

Protected Attributes

unsigned long id {}
 
std::unique_ptr< const IOriginorigin
 
std::unique_ptr< RJDocumentjson
 
std::unique_ptr< ViewLayerview
 
bool isView_ = false
 

Detailed Description

The wrapper class of JSON documents, parsed into the internal rapidJSON format

Constructor & Destructor Documentation

◆ RapidJsonDocument() [1/5]

RapidJsonDocument::RapidJsonDocument ( unsigned long  id,
std::unique_ptr< RJDocument > &&  json,
std::unique_ptr< const IOrigin > &&  origin 
)

Creates a new RapidJsonDocument

Parameters
idThe ID of the document
originThe origin of the document
jsonThe actual JSON content

◆ RapidJsonDocument() [2/5]

RapidJsonDocument::RapidJsonDocument ( std::unique_ptr< RJDocument > &&  json,
std::unique_ptr< const IOrigin > &&  origin 
)

Creates a new RapidJsonDocument

Parameters
originThe origin of the document
jsonThe actual JSON content

◆ ~RapidJsonDocument()

RapidJsonDocument::~RapidJsonDocument ( )
default

◆ RapidJsonDocument() [3/5]

RapidJsonDocument::RapidJsonDocument ( RapidJsonDocument &&  doc)
defaultnoexcept

Move constructor

Parameters
docother document

◆ RapidJsonDocument() [4/5]

RapidJsonDocument::RapidJsonDocument ( const RapidJsonDocument doc)
delete

Copy constructor

Parameters
docThe RapidJsonDocument to copy from

◆ RapidJsonDocument() [5/5]

RapidJsonDocument::RapidJsonDocument ( )
default

Creates an empty dummy RapidJsonDocument

Member Function Documentation

◆ Accept()

template<typename Handler >
bool RapidJsonDocument::Accept ( Handler &  handler) const
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get()

RJValue const * RapidJsonDocument::Get ( const RJPointer ptr) const
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getId()

unsigned long RapidJsonDocument::getId ( ) const

Returns the DOC_ID of the document

Returns
the DOC_ID of the document
Here is the caller graph for this function:

◆ getJson()

const std::unique_ptr< RJDocument > & RapidJsonDocument::getJson ( ) const

Returns the internal representation

Returns
The internal RJDocument
Here is the caller graph for this function:

◆ getNewID()

DOC_ID RapidJsonDocument::getNewID ( )
static

returns a unique document ID

Returns
unique document ID

◆ getOrigin()

const std::unique_ptr< const IOrigin > & RapidJsonDocument::getOrigin ( ) const
Here is the caller graph for this function:

◆ getView()

const std::unique_ptr< ViewLayer > & RapidJsonDocument::getView ( ) const
Here is the caller graph for this function:

◆ isValid()

bool RapidJsonDocument::isValid ( ) const
Returns
true, if the document contains a valid json document

◆ isView()

bool RapidJsonDocument::isView ( ) const
Returns
true, if the document is a view
Here is the caller graph for this function:

◆ operator=() [1/2]

RapidJsonDocument& RapidJsonDocument::operator= ( const RapidJsonDocument other)
delete

◆ operator=() [2/2]

RapidJsonDocument& RapidJsonDocument::operator= ( RapidJsonDocument &&  other)
defaultnoexcept

◆ removeDoc()

void RapidJsonDocument::removeDoc ( )

Deletes the internal json document

◆ setJson()

void RapidJsonDocument::setJson ( std::unique_ptr< RJDocument > &&  json)

Sets the internal RJDocument

Parameters
jsonThe document to store

◆ setOrigin()

void RapidJsonDocument::setOrigin ( std::unique_ptr< const IOrigin > &&  orig)

Sets the Origin of the document

Parameters
origThe new origin

◆ setView()

void RapidJsonDocument::setView ( std::unique_ptr< ViewLayer > &&  view)

Field Documentation

◆ id

unsigned long RapidJsonDocument::id {}
protected

◆ isView_

bool RapidJsonDocument::isView_ = false
protected

◆ json

std::unique_ptr<RJDocument> RapidJsonDocument::json
protected

◆ origin

std::unique_ptr<const IOrigin> RapidJsonDocument::origin
protected

◆ view

std::unique_ptr<ViewLayer> RapidJsonDocument::view
protected

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