Ditto 2.0.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ditto::Rga Class Reference

Represents a CRDT Replicated Growable Array (RGA) that can be upserted as part of a document or assigned to a property during an update of a document. More...

#include <Rga.hpp>

Inheritance diagram for ditto::Rga:
ditto::MutableRga

Public Member Functions

 Rga (std::vector< nlohmann::json > value=std::vector< nlohmann::json >()) DITTO_DEPRECATED
 Construct a new Rga object than can be used as part of a document's context. More...
 
DittoCrdtType get_type () const
 
std::vector< nlohmann::jsonget_value () const
 Return the array representation of the RGA. More...
 

Protected Member Functions

size_t size () const
 

Protected Attributes

std::vector< nlohmann::jsonvalue
 

Detailed Description

Represents a CRDT Replicated Growable Array (RGA) that can be upserted as part of a document or assigned to a property during an update of a document.

Constructor & Destructor Documentation

◆ Rga()

ditto::Rga::Rga ( std::vector< nlohmann::json value = std::vector<nlohmann::json>())

Construct a new Rga object than can be used as part of a document's context.

Parameters
valuethe array to use as the RGA's representation.

Member Function Documentation

◆ get_value()

std::vector< json > ditto::Rga::get_value ( ) const

Return the array representation of the RGA.

Returns
std::vector<nlohmann::json>