Raptor 4.0.0-rc.1
A fast and space-efficient pre-filter
Loading...
Searching...
No Matches
write_metadata.cpp File Reference

Implements raptor::detail::write_text and raptor::detail::write_json. More...

#include "write_metadata.hpp"
#include <ostream>
#include <string>
#include <string_view>
#include <raptor/inspect/json_writer.hpp>
+ Include dependency graph for write_metadata.cpp:

Functions

void raptor::detail::write_json (std::ostream &stream, index_metadata const &metadata, bool const user_bins)
 Writes metadata as a single JSON object.
 
void raptor::detail::write_text (std::ostream &stream, index_metadata const &metadata, bool const user_bins)
 Writes metadata as ## Key = value lines, like the header of a raptor search result.
 

Detailed Description

Implements raptor::detail::write_text and raptor::detail::write_json.

Author
Enrico Seiler <enrico.seiler AT fu-berlin.de>

Function Documentation

◆ write_json()

void raptor::detail::write_json ( std::ostream & stream,
index_metadata const & metadata,
bool const user_bins )

Writes metadata as a single JSON object.

Parameters
[out]streamThe stream to write to.
[in]metadataThe metadata to write.
[in]user_binsWhether to list the files of every user bin.

Contains the same values as raptor::detail::write_text.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write_text()

void raptor::detail::write_text ( std::ostream & stream,
index_metadata const & metadata,
bool const user_bins )

Writes metadata as ## Key = value lines, like the header of a raptor search result.

Parameters
[out]streamThe stream to write to.
[in]metadataThe metadata to write.
[in]user_binsWhether to list the files of every user bin, as #<id>\t<file>[,<file>...], directly after the number of user bins.

If metadata.structure is set, the output ends with one tab-separated line per IBF, preceded by the column names in a line starting with #IBF.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:
Hide me