Gemmi C++ API
Loading...
Searching...
No Matches
Namespaces | Macros | Functions
cif.hpp File Reference
#include <cassert>
#include <cstdio>
#include <iosfwd>
#include <string>
#include "third_party/tao/pegtl.hpp"
#include "cifdoc.hpp"
#include "input.hpp"

Go to the source code of this file.

Namespaces

namespace  gemmi
 
namespace  gemmi::cif
 

Macros

#define error_msg(rule, msg)
 
#define GEMMI_CIF_FILE_INPUT(in, path)    tao::pegtl::file_input<> in(path)
 

Functions

template<typename Rule >
const std::string & gemmi::cif::error_message ()
 
template<typename Input >
void gemmi::cif::parse_input (Document &d, Input &&in)
 
template<typename Input >
Document gemmi::cif::read_input (Input &&in)
 
template<typename Input >
size_t gemmi::cif::parse_one_block (Document &d, Input &&in)
 
Document gemmi::cif::read_file (const std::string &filename)
 
Document gemmi::cif::read_string (const std::string &data)
 
Document gemmi::cif::read_memory (const char *data, size_t size, const char *name)
 
Document gemmi::cif::read_cstream (std::FILE *f, size_t bufsize, const char *name)
 
Document gemmi::cif::read_istream (std::istream &is, size_t bufsize, const char *name)
 
template<typename Input >
bool gemmi::cif::check_syntax (Input &&in, std::string *msg)
 
template<typename T >
Document gemmi::cif::read (T &&input)
 
template<typename T >
bool gemmi::cif::check_syntax_any (T &&input, std::string *msg)
 
template<typename T >
size_t gemmi::cif::read_one_block (Document &d, T &&input, size_t limit)
 

Macro Definition Documentation

◆ error_msg

#define error_msg (   rule,
  msg 
)
Value:
template<> inline const std::string& error_message<rule>() { \
static const std::string s = msg; \
return s; \
}

Definition at line 157 of file cif.hpp.

◆ GEMMI_CIF_FILE_INPUT

#define GEMMI_CIF_FILE_INPUT (   in,
  path 
)     tao::pegtl::file_input<> in(path)

Definition at line 294 of file cif.hpp.