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

bib-element-Container More...

#include <BibElement.hpp>

+ Collaboration diagram for BibElement:

Public Member Functions

auto isCompliantTo (const StyleProperties &props) const -> bool
 
auto operator== (const BibElement &other) const noexcept -> bool
 
auto findAttribute (const std::string &key) const noexcept -> std::optional< Field >
 

Public Attributes

std::string id
 the elements (unique) id More...
 
std::string style
 the style-name of the element More...
 
std::vector< Fieldattributes
 the attributes of the element More...
 

Detailed Description

bib-element-Container

Stores information of a bib-element

Examples
/github/workspace/test/BibElementFixtureTest.cpp, and /github/workspace/test/ParserStateFixtureTest.cpp.

Definition at line 14 of file BibElement.hpp.

Member Function Documentation

◆ findAttribute()

auto BibElement::findAttribute ( const std::string &  key) const -> std::optional<Field>
noexcept

Finds an attribute for a given Key in the Elements attribute

Parameters
keythe key for the attribute to look for
Returns
the field (or none if not found)

Definition at line 46 of file BibElement.cpp.

Referenced by Parser::sortElements().

+ Here is the caller graph for this function:

◆ isCompliantTo()

auto BibElement::isCompliantTo ( const StyleProperties props) const -> bool

Checks if the bib-element is compliant to given style-properties

Parameters
propsstyle-properties to check compliance against
Returns
weather the element is compliant or not

Definition at line 12 of file BibElement.cpp.

References Field::name.

Referenced by Parser::filterElements().

+ Here is the caller graph for this function:

◆ operator==()

auto BibElement::operator== ( const BibElement other) const -> bool
noexcept

Equality-Operator for two bib-elements

Parameters
otherbib-element to compare with
Returns
weather the two bib-elements are deeply equal

Definition at line 37 of file BibElement.cpp.

Member Data Documentation

◆ attributes

std::vector<Field> BibElement::attributes

the attributes of the element

Definition at line 17 of file BibElement.hpp.

Referenced by AbstractGenerator::uniqueFieldsOf().

◆ id

std::string BibElement::id

the elements (unique) id

Definition at line 15 of file BibElement.hpp.

◆ style

std::string BibElement::style

the style-name of the element

Definition at line 16 of file BibElement.hpp.


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