btool
A parser/converter/transpiler for .bib files
PlainTextGenerator Struct Reference

#include <PlainTextGenerator.hpp>

+ Inheritance diagram for PlainTextGenerator:
+ Collaboration diagram for PlainTextGenerator:

Public Member Functions

auto fail (const std::string &message, const std::string &type) -> void override
 
auto write () -> std::string override
 
 PlainTextGenerator (const std::vector< BibElement > &elements)
 
- Public Member Functions inherited from AbstractGenerator
 AbstractGenerator (std::vector< BibElement > elements)
 
- Public Member Functions inherited from Generator
virtual ~Generator ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from AbstractGenerator
static auto uniqueFieldsOf (const std::vector< BibElement > &values) noexcept -> std::unordered_set< std::string >
 
static auto sortedFields (const std::vector< Field > &set) noexcept -> std::vector< Field >
 
- Protected Attributes inherited from AbstractGenerator
std::vector< BibElementelements
 Elements to write. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ PlainTextGenerator()

PlainTextGenerator::PlainTextGenerator ( const std::vector< BibElement > &  elements)
explicit

Definition at line 31 of file PlainTextGenerator.cpp.

References AbstractGenerator::elements.

Member Function Documentation

◆ fail()

auto PlainTextGenerator::fail ( const std::string &  message,
const std::string &  type 
) -> void
overridevirtual

Throws a HTML-Generator-Exception

Parameters
messagethe message to append

Reimplemented from AbstractGenerator.

Definition at line 27 of file PlainTextGenerator.cpp.

References AbstractGenerator::fail().

+ Here is the call graph for this function:

◆ write()

auto PlainTextGenerator::write ( ) -> std::string
overridevirtual

Writes all elements as plain text

Returns
the written output as String
Exceptions
FileWriterExceptionon error

Reimplemented from AbstractGenerator.

Examples
/github/workspace/test/GeneratorFixtureTest.cpp.

Definition at line 9 of file PlainTextGenerator.cpp.

Referenced by main(), and TEST_F().

+ Here is the caller graph for this function:

The documentation for this struct was generated from the following files: