souffle  2.0.2-371-g6315b36
Protected Member Functions | Protected Attributes
souffle::WriteStreamCSV Class Reference

#include <WriteStreamCSV.h>

Inheritance diagram for souffle::WriteStreamCSV:
Inheritance graph
Collaboration diagram for souffle::WriteStreamCSV:
Collaboration graph

Protected Member Functions

void writeNextTupleCSV (std::ostream &destination, const RamDomain *tuple)
 
void writeNextTupleElement (std::ostream &destination, const std::string &type, RamDomain value)
 
 WriteStreamCSV (const std::map< std::string, std::string > &rwOperation, const SymbolTable &symbolTable, const RecordTable &recordTable)
 
- Protected Member Functions inherited from souffle::WriteStream
void outputADT (std::ostream &destination, const RamDomain value, const std::string &name)
 
void outputRecord (std::ostream &destination, const RamDomain value, const std::string &name)
 
template<typename Tuple >
void writeNext (const Tuple tuple)
 
virtual void writeNextTuple (const RamDomain *tuple)=0
 
virtual void writeNullary ()=0
 
virtual void writeSize (std::size_t)
 
- Protected Member Functions inherited from souffle::SerialisationStream< true >
 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

const std::string delimiter
 
- Protected Attributes inherited from souffle::WriteStream
const bool summary
 
- Protected Attributes inherited from souffle::SerialisationStream< true >
size_t arity
 
size_t auxiliaryArity
 
RO< RecordTable > & recordTable
 
RO< SymbolTable > & symbolTable
 
std::vector< std::string > typeAttributes
 
Json types
 

Additional Inherited Members

- Public Member Functions inherited from souffle::WriteStream
template<typename T >
void writeAll (const T &relation)
 
template<>
void writeNext (const RamDomain *tuple)
 
template<typename T >
void writeSize (const T &relation)
 
 WriteStream (const std::map< std::string, std::string > &rwOperation, const SymbolTable &symbolTable, const RecordTable &recordTable)
 
- Public Member Functions inherited from souffle::SerialisationStream< true >
virtual ~SerialisationStream ()=default
 
- Protected Types inherited from souffle::SerialisationStream< true >
using RO = std::conditional_t< readOnlyTables, const A, A >
 

Detailed Description

Definition at line 44 of file WriteStreamCSV.h.

Constructor & Destructor Documentation

◆ WriteStreamCSV()

souffle::WriteStreamCSV::WriteStreamCSV ( const std::map< std::string, std::string > &  rwOperation,
const SymbolTable symbolTable,
const RecordTable recordTable 
)
inlineprotected

Definition at line 46 of file WriteStreamCSV.h.

49  {

Member Function Documentation

◆ writeNextTupleCSV()

void souffle::WriteStreamCSV::writeNextTupleCSV ( std::ostream &  destination,
const RamDomain tuple 
)
inlineprotected

Definition at line 53 of file WriteStreamCSV.h.

60  {
61  switch (type[0]) {
62  case 's': destination << symbolTable.unsafeResolve(value); break;

Referenced by souffle::WriteFileCSV::writeNullary(), and souffle::WriteCoutCSV::writeNullary().

◆ writeNextTupleElement()

void souffle::WriteStreamCSV::writeNextTupleElement ( std::ostream &  destination,
const std::string &  type,
RamDomain  value 
)
inlineprotected

Definition at line 64 of file WriteStreamCSV.h.

64  : destination << ramBitCast<RamUnsigned>(value); break;
65  case 'f': destination << ramBitCast<RamFloat>(value); break;
66  case 'r': outputRecord(destination, value, type); break;
67  case '+': outputADT(destination, value, type); break;
68  default: fatal("unsupported type attribute: `%c`", type[0]);
69  }
70  }
71 };
72 
73 class WriteFileCSV : public WriteStreamCSV {
74 public:

Field Documentation

◆ delimiter

const std::string souffle::WriteStreamCSV::delimiter
protected

Definition at line 49 of file WriteStreamCSV.h.


The documentation for this class was generated from the following file:
souffle::WriteStreamCSV::WriteStreamCSV
WriteStreamCSV(const std::map< std::string, std::string > &rwOperation, const SymbolTable &symbolTable, const RecordTable &recordTable)
Definition: WriteStreamCSV.h:46
souffle::WriteStream::outputADT
void outputADT(std::ostream &destination, const RamDomain value, const std::string &name)
Definition: WriteStream.h:124
souffle::SerialisationStream< true >::symbolTable
RO< SymbolTable > & symbolTable
Definition: SerialisationStream.h:71
souffle::WriteStream::outputRecord
void outputRecord(std::ostream &destination, const RamDomain value, const std::string &name)
Definition: WriteStream.h:83
souffle::fatal
void fatal(const char *format, const Args &... args)
Definition: MiscUtil.h:198
std::type
ElementType type
Definition: span.h:640