souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
souffle::SerialisationStream< readOnlyTables > Class Template Reference

#include <SerialisationStream.h>

Collaboration diagram for souffle::SerialisationStream< readOnlyTables >:
Collaboration graph

Public Member Functions

virtual ~SerialisationStream ()=default
 

Protected Types

template<typename A >
using RO = std::conditional_t< readOnlyTables, const A, A >
 

Protected Member Functions

 SerialisationStream (RO< SymbolTable > &symTab, RO< RecordTable > &recTab, const std::map< std::string, std::string > &rwOperation)
 
 SerialisationStream (RO< SymbolTable > &symTab, RO< RecordTable > &recTab, Json types)
 
 SerialisationStream (RO< SymbolTable > &symTab, RO< RecordTable > &recTab, Json types, std::vector< std::string > relTypes, size_t auxArity=0)
 

Protected Attributes

size_t arity = 0
 
size_t auxiliaryArity = 0
 
RO< RecordTable > & recordTable
 
RO< SymbolTable > & symbolTable
 
std::vector< std::string > typeAttributes
 
Json types
 

Private Member Functions

void setupFromJson ()
 

Detailed Description

template<bool readOnlyTables>
class souffle::SerialisationStream< readOnlyTables >

Definition at line 43 of file SerialisationStream.h.

Member Typedef Documentation

◆ RO

template<bool readOnlyTables>
template<typename A >
using souffle::SerialisationStream< readOnlyTables >::RO = std::conditional_t<readOnlyTables, const A, A>
protected

Definition at line 49 of file SerialisationStream.h.

Constructor & Destructor Documentation

◆ ~SerialisationStream()

template<bool readOnlyTables>
virtual souffle::SerialisationStream< readOnlyTables >::~SerialisationStream ( )
virtualdefault

◆ SerialisationStream() [1/3]

template<bool readOnlyTables>
souffle::SerialisationStream< readOnlyTables >::SerialisationStream ( RO< SymbolTable > &  symTab,
RO< RecordTable > &  recTab,
Json  types,
std::vector< std::string >  relTypes,
size_t  auxArity = 0 
)
inlineprotected

Definition at line 51 of file SerialisationStream.h.

52  : symbolTable(symTab), recordTable(recTab), types(std::move(types)) {
53  setupFromJson();
54  }
55 

◆ SerialisationStream() [2/3]

template<bool readOnlyTables>
souffle::SerialisationStream< readOnlyTables >::SerialisationStream ( RO< SymbolTable > &  symTab,
RO< RecordTable > &  recTab,
Json  types 
)
inlineprotected

Definition at line 57 of file SerialisationStream.h.

58  : symbolTable(symTab), recordTable(recTab) {
59  std::string parseErrors;
60  types = Json::parse(rwOperation.at("types"), parseErrors);

◆ SerialisationStream() [3/3]

template<bool readOnlyTables>
souffle::SerialisationStream< readOnlyTables >::SerialisationStream ( RO< SymbolTable > &  symTab,
RO< RecordTable > &  recTab,
const std::map< std::string, std::string > &  rwOperation 
)
inlineprotected

Definition at line 62 of file SerialisationStream.h.

73  :
74  void setupFromJson() {

Member Function Documentation

◆ setupFromJson()

template<bool readOnlyTables>
void souffle::SerialisationStream< readOnlyTables >::setupFromJson ( )
inlineprivate

Definition at line 80 of file SerialisationStream.h.

83  {
84  auto&& type = relTypes[i].string_value();
85  assert(!type.empty() && "malformed types tag");
86  typeAttributes.push_back(type);
87  }
88  }
89 };
90 
91 } // namespace souffle

Referenced by souffle::SerialisationStream< true >::SerialisationStream().

Field Documentation

◆ arity

template<bool readOnlyTables>
size_t souffle::SerialisationStream< readOnlyTables >::arity = 0
protected

Definition at line 76 of file SerialisationStream.h.

◆ auxiliaryArity

template<bool readOnlyTables>
size_t souffle::SerialisationStream< readOnlyTables >::auxiliaryArity = 0
protected

Definition at line 77 of file SerialisationStream.h.

◆ recordTable

template<bool readOnlyTables>
RO<RecordTable>& souffle::SerialisationStream< readOnlyTables >::recordTable
protected

Definition at line 72 of file SerialisationStream.h.

◆ symbolTable

template<bool readOnlyTables>
RO<SymbolTable>& souffle::SerialisationStream< readOnlyTables >::symbolTable
protected

Definition at line 71 of file SerialisationStream.h.

◆ typeAttributes

template<bool readOnlyTables>
std::vector<std::string> souffle::SerialisationStream< readOnlyTables >::typeAttributes
protected

Definition at line 74 of file SerialisationStream.h.

◆ types

template<bool readOnlyTables>
Json souffle::SerialisationStream< readOnlyTables >::types
protected

The documentation for this class was generated from the following file:
souffle::SerialisationStream::recordTable
RO< RecordTable > & recordTable
Definition: SerialisationStream.h:72
json11::Json::parse
static Json parse(const std::string &in, std::string &err, JsonParse strategy=JsonParse::STANDARD)
Definition: json11.h:1071
souffle::SerialisationStream::symbolTable
RO< SymbolTable > & symbolTable
Definition: SerialisationStream.h:71
souffle::SerialisationStream::typeAttributes
std::vector< std::string > typeAttributes
Definition: SerialisationStream.h:74
souffle::SerialisationStream::types
Json types
Definition: SerialisationStream.h:73
i
size_t i
Definition: json11.h:663
std::type
ElementType type
Definition: span.h:640
souffle::SerialisationStream::setupFromJson
void setupFromJson()
Definition: SerialisationStream.h:80