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

Represents a CRDT Replicated Growable Array (RGA). More...

#include <Rga.hpp>

Public Member Functions

DittoCrdtType get_type () const
 
std::vector< nlohmann::jsonget_value () const
 Return the array representation of the RGA. More...
 

Protected 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...
 
size_t size () const
 

Protected Attributes

std::vector< nlohmann::jsonvalue
 

Detailed Description

Represents a CRDT Replicated Growable Array (RGA).

Note
RGAs are deprecated and you should instead use a Register containing an array.

Constructor & Destructor Documentation

◆ Rga()

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

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>