lintel 0.2.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
lintel::HistoryDtos Class Reference

#include <HistoryDtos.h>

Inheritance diagram for lintel::HistoryDtos:
lintel::JsonSerializable

Public Member Functions

 HistoryDtos (const std::vector< HistoryEntry > entries)
 
 HistoryDtos ()=default
 
const std::vector< HistoryDto > & getHistories () const
 
void serialize (rapidjson::Writer< rapidjson::StringBuffer > *writer) const override
 
void deserialize (const std::string &json) override
 
- Public Member Functions inherited from lintel::JsonSerializable
 JsonSerializable ()=default
 
virtual ~JsonSerializable ()=default
 
virtual bool deserialize (const rapidjson::Value &obj)
 
virtual std::string serialize () const
 

Detailed Description

DTO representing a collection of history entries

Constructor & Destructor Documentation

◆ HistoryDtos() [1/2]

lintel::HistoryDtos::HistoryDtos ( const std::vector< HistoryEntry >  entries)
explicit

Construct from HistoryEntry models

Parameters
entriesThe source history entries

◆ HistoryDtos() [2/2]

lintel::HistoryDtos::HistoryDtos ( )
default

Default constructor

Member Function Documentation

◆ deserialize()

void lintel::HistoryDtos::deserialize ( const std::string &  json)
overridevirtual

Deserialize from JSON string

Parameters
jsonThe JSON string to parse

Reimplemented from lintel::JsonSerializable.

◆ getHistories()

const std::vector< HistoryDto > & lintel::HistoryDtos::getHistories ( ) const

Get the history DTOs

Returns
Vector of history DTOs

◆ serialize()

void lintel::HistoryDtos::serialize ( rapidjson::Writer< rapidjson::StringBuffer > *  writer) const
overridevirtual

Serialize to JSON

Parameters
writerThe rapidjson writer

Implements lintel::JsonSerializable.


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