NuriKit v0.1.0b2
Loading...
Searching...
No Matches
cif.h File Reference
#include "nuri/utils.h"
Include dependency graph for cif.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  nuri::CifParser

Namespaces

namespace  nuri

Functions

internal::CifValue nuri::cif_value (std::string_view value)
 Create a string CIF value from text.
template<class T, std::enable_if_t< std::is_same_v< T, bool >, int > = 0>
internal::CifValue nuri::cif_value (T value, bool short_form=false)
 Create a boolean CIF value.
template<class T, std::enable_if_t< std::is_integral_v< T > &&!std::is_same_v< T, bool >, int > = 0>
internal::CifValue nuri::cif_value (T value, int width=0)
 Create an integral CIF value.
template<class T, std::enable_if_t< std::is_floating_point_v< T >, int > = 0>
internal::CifValue nuri::cif_value (T value, int precision=-1, bool coerce_nonfinite=false, bool is_unk=true)
 Create a floating-point CIF value.
template<class T, std::enable_if_t<!std::is_arithmetic_v< std::decay_t< T > > &&!std::is_convertible_v< T, std::string_view >, int > = 0>
internal::CifValue nuri::cif_value (T &&value)
 Create a string CIF value from any absl::StrCat-able type.
bool nuri::write_cif_table (std::string &out, const internal::CifTable &table, bool align=false)
 Serialize a CIF table (key-value pairs or a loop_), appending to out.
bool nuri::write_cif_frame (std::string &out, const internal::CifFrame &frame, internal::CifFrame::Type type=internal::CifFrame::Type::kData, bool align=false)
 Serialize a CIF frame, appending to out.
bool nuri::write_cif_block (std::string &out, const internal::CifBlock &block, bool align=false)
 Serialize a CIF block (a data or global block plus its save frames), appending to out.