Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
fmt Namespace Reference

Namespaces

 internal
 

Classes

struct  AlignSpec
 
struct  AlignTypeSpec
 
class  ArgFormatter
 
struct  ArgJoin
 
class  ArgList
 
class  ArgVisitor
 
class  BasicArgFormatter
 
class  BasicArrayWriter
 
class  BasicCStringRef
 
class  BasicFormatter
 
class  BasicMemoryWriter
 
class  BasicPrintfArgFormatter
 
class  BasicStringRef
 
class  BasicWriter
 
class  Buffer
 
class  BufferedFile
 
struct  EmptySpec
 
class  ErrorCode
 
class  File
 
class  FormatError
 
class  FormatInt
 
struct  FormatSpec
 
class  IntFormatSpec
 
class  StrFormatSpec
 
class  SystemError
 
struct  TypeSpec
 
struct  WidthSpec
 

Typedefs

typedef BasicWriter< char > Writer
 
typedef BasicWriter< wchar_t > WWriter
 
typedef BasicStringRef< char > StringRef
 
typedef BasicStringRef< wchar_t > WStringRef
 
typedef BasicCStringRef< char > CStringRef
 
typedef BasicCStringRef< wchar_t > WCStringRef
 
typedef BasicMemoryWriter< char > MemoryWriter
 
typedef BasicMemoryWriter
< wchar_t > 
WMemoryWriter
 
typedef BasicArrayWriter< char > ArrayWriter
 
typedef BasicArrayWriter< wchar_t > WArrayWriter
 

Enumerations

enum  Alignment {
  ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_CENTER,
  ALIGN_NUMERIC
}
 
enum  {
  SIGN_FLAG = 1, PLUS_FLAG = 2, MINUS_FLAG = 4, HASH_FLAG = 8,
  CHAR_FLAG = 0x10
}
 
enum  Color {
  BLACK, RED, GREEN, YELLOW,
  BLUE, MAGENTA, CYAN, WHITE
}
 

Functions

FMT_FUNC void format_system_error (Writer &out, int error_code, StringRef message) FMT_NOEXCEPT
 
FMT_FUNC void report_system_error (int error_code, fmt::StringRef message) FMT_NOEXCEPT
 
FMT_FUNC void print (std::FILE *f, CStringRef format_str, ArgList args)
 
FMT_FUNC void print (CStringRef format_str, ArgList args)
 
FMT_FUNC void print_colored (Color c, CStringRef format, ArgList args)
 
IntFormatSpec< int, TypeSpec<'b'> > bin (int value)
 
IntFormatSpec< int, TypeSpec<'o'> > oct (int value)
 
IntFormatSpec< int, TypeSpec<'x'> > hex (int value)
 
IntFormatSpec< int, TypeSpec<'X'> > hexu (int value)
 
template<char TYPE_CODE, typename Char >
IntFormatSpec< int,
AlignTypeSpec< TYPE_CODE >
, Char > 
pad (int value, unsigned width, Char fill= ' ')
 
template<typename Char >
StrFormatSpec< Char > pad (const Char *str, unsigned width, Char fill= ' ')
 
StrFormatSpec< wchar_t > pad (const wchar_t *str, unsigned width, char fill= ' ')
 
std::string format (CStringRef format_str, ArgList args)
 
std::wstring format (WCStringRef format_str, ArgList args)
 
template<typename T >
void format_decimal (char *&buffer, T value)
 
template<typename T >
internal::NamedArgWithType
< char, T
arg (StringRef name, const T &arg)
 
template<typename T >
internal::NamedArgWithType
< wchar_t, T
arg (WStringRef name, const T &arg)
 
template<typename Char >
void arg (StringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
 
template<typename Char >
void arg (WStringRef, const internal::NamedArg< Char > &) FMT_DELETED_OR_UNDEFINED
 
template<typename It >
ArgJoin< char, It > join (It first, It last, const BasicCStringRef< char > &sep)
 
template<typename It >
ArgJoin< wchar_t, It > join (It first, It last, const BasicCStringRef< wchar_t > &sep)
 
template<typename ArgFormatter , typename Char , typename It >
void format_arg (fmt::BasicFormatter< Char, ArgFormatter > &f, const Char *&format_str, const ArgJoin< Char, It > &e)
 
long getpagesize ()
 

Variables

FMT_GCC_EXTENSION typedef long long LongLong
 
FMT_GCC_EXTENSION typedef
unsigned long long 
ULongLong
 

Typedef Documentation

Enumeration Type Documentation

anonymous enum
Enumerator
SIGN_FLAG 
PLUS_FLAG 
MINUS_FLAG 
HASH_FLAG 
CHAR_FLAG 
Enumerator
ALIGN_DEFAULT 
ALIGN_LEFT 
ALIGN_RIGHT 
ALIGN_CENTER 
ALIGN_NUMERIC 
enum fmt::Color
Enumerator
BLACK 
RED 
GREEN 
YELLOW 
BLUE 
MAGENTA 
CYAN 
WHITE 

Function Documentation

template<typename T >
internal::NamedArgWithType<char, T> fmt::arg ( StringRef  name,
const T arg 
)
inline

Returns a named argument for formatting functions.

Example**::

print("Elapsed time: {s:.2f} seconds", arg("s", 1.23));

References arg(), and name.

Referenced by fmt::internal::FormatterBase::do_get_arg(), utility::options::OptionCollection::load(), and binder::template_specialization().

template<typename T >
internal::NamedArgWithType<wchar_t, T> fmt::arg ( WStringRef  name,
const T arg 
)
inline

References arg(), and name.

template<typename Char >
void fmt::arg ( StringRef  ,
const internal::NamedArg< Char > &   
)
template<typename Char >
void fmt::arg ( WStringRef  ,
const internal::NamedArg< Char > &   
)
IntFormatSpec<int, TypeSpec<'b'> > fmt::bin ( int  value)

Returns an integer format specifier to format the value in base 2.

std::string fmt::format ( CStringRef  format_str,
ArgList  args 
)
inline
std::wstring fmt::format ( WCStringRef  format_str,
ArgList  args 
)
inline
template<typename ArgFormatter , typename Char , typename It >
void fmt::format_arg ( fmt::BasicFormatter< Char, ArgFormatter > &  f,
const Char *&  format_str,
const ArgJoin< Char, It > &  e 
)
template<typename T >
void fmt::format_decimal ( char *&  buffer,
T  value 
)
inline
FMT_API void fmt::format_system_error ( fmt::Writer out,
int  error_code,
fmt::StringRef  message 
)

Formats an error returned by an operating system or a language runtime, for example a file opening error, and writes it to out in the following form:

.. parsed-literal:: <message>*: *<system-message>*

where *<message>* is the passed message and *<system-message>* is the system message corresponding to the error code. error_code* is a system error code as given by errno. If error_code is not a valid error code such as -1, the system message may look like "Unknown error -1" and is platform-dependent.

References FMT_CATCH, FMT_TRY, fmt::internal::INLINE_BUFFER_SIZE, pyrosetta.utility.array::message, erraser_single_res_analysis::out, fmt::Buffer< T >::resize(), and fmt::Buffer< T >::size().

Referenced by fmt::internal::format_system_error().

long fmt::getpagesize ( )
IntFormatSpec<int, TypeSpec<'x'> > fmt::hex ( int  value)

Returns an integer format specifier to format the value in base 16 using lower-case letters for the digits above 9.

Referenced by basic::random::determine_random_number_seed(), basic::Emitter::escape_string(), and utility::string_to_sha1().

IntFormatSpec<int, TypeSpec<'X'> > fmt::hexu ( int  value)

Returns an integer formatter format specifier to format in base 16 using upper-case letters for the digits above 9.

template<typename It >
ArgJoin<char, It> fmt::join ( It  first,
It  last,
const BasicCStringRef< char > &  sep 
)

References assign_charges::first, and basic::options::OptionKeys::sc::sep.

Referenced by pyrosetta.distributed.viewer.core.ViewerInputError::__init__(), pyrosetta.distributed.viewer.modules.setStyle::__init__(), pyrosetta.distributed.viewer.modules.ViewerInputError::__init__(), pyrosetta.distributed.tasks.taskbase.TaskBase::__repr__(), pyrosetta.toolbox.atom_pair_energy::_atom_pair_energy_table(), pyrosetta.distributed::_normflags(), pyrosetta.distributed.viewer.modules::_pdbstring_to_pose(), pyrosetta::_version_string(), pyrosetta.distributed.viewer.modules.setHydrogenBonds::apply(), pyrosetta.distributed.dask.worker::dask_setup(), pyrosetta.bindings.pose::display_secstruct(), erraser_wrapper::erraser_minimize(), erraser_single_res_analysis::extract_info(), sidechain_cst_3::find_CA(), build::generate_bindings(), build::generate_cmake_file(), pyrosetta.toolbox.generate_resfile::generate_resfile_from_pose(), build::generate_rosetta_cmake_files(), build::generate_rosetta_external_cmake_files(), sphinx-doc-generator::generate_rst_sphinx_files(), mutant_modeler.MutantModeler::get_high_res_command_lines(), mutant_modeler.MutantModeler::get_med_res_command_lines(), sidechain_cst_3::main(), options::main(), self-test::main(), make_bindings_via_cmake::make_bindings_code(), mutant_modeler.MutantModeler::make_high_res_subsets_and_cmd_lines(), DRRAFTER_util::parse_tag(), self-test::run_test(), demo.D090_Ala_scan::scanning(), DRRAFTER::setup_job(), erraser_wrapper::SWA_rebuild_erraser_postproc(), pyrosetta.tests.bindings.core.test_pose.TestPoseResidueAccessor::test_residues(), pyrosetta.tests.distributed.test_dask_worker.TestDaskArgs::test_worker_extra(), pyrosetta.distributed::with_lock(), arls_impl::write_common_flags(), arls_impl::write_rpkmin_script(), arls_impl::write_setup_script(), and options_class::writeToFile().

template<typename It >
ArgJoin<wchar_t, It> fmt::join ( It  first,
It  last,
const BasicCStringRef< wchar_t > &  sep 
)
IntFormatSpec<int, TypeSpec<'o'> > fmt::oct ( int  value)

Returns an integer format specifier to format the value in base 8.

template<char TYPE_CODE, typename Char >
IntFormatSpec<int, AlignTypeSpec<TYPE_CODE>, Char> fmt::pad ( int  value,
unsigned  width,
Char  fill = ' ' 
)

Returns an integer format specifier to pad the formatted argument with the fill character to the specified width using the default (right) numeric alignment.

Example**::

MemoryWriter out; out << pad(hex(0xcafe), 8, '0'); out.str() == "0000cafe"

template<typename Char >
StrFormatSpec<Char> fmt::pad ( const Char *  str,
unsigned  width,
Char  fill = ' ' 
)
inline

Returns a string formatter that pads the formatted argument with the fill character to the specified width using the default (left) string alignment.

Example**::

std::string s = str(MemoryWriter() << pad("abc", 8)); s == "abc "

References basic::options::OptionKeys::mp::visualize::width.

StrFormatSpec<wchar_t> fmt::pad ( const wchar_t *  str,
unsigned  width,
char  fill = ' ' 
)
inline
FMT_API void fmt::print ( std::FILE *  f,
CStringRef  format_str,
ArgList  args 
)

Prints formatted data to the file f.

Example**::

print(stderr, "Don't {}!", "panic");

References fmt::BasicWriter< Char >::data(), demo.D060_Folding::f, fmt::BasicWriter< Char >::size(), numeric::statistics::w(), and fmt::BasicWriter< Char >::write().

Referenced by test.T850_SubClassing.PyValue::__init__(), test.T850_SubClassing.A::__init__(), options_class.Option::__init__(), test.T850_SubClassing.My_New_Mover::__init__(), test.T850_SubClassing.MyNewCI1B::__init__(), PyMOL-RosettaServer.Matrix::__init__(), pyrosetta.toolbox.atom_pair_energy::_atom_pair_energy_table(), test.Workshop9_my_shapes.PhiNByXDegreesMover::apply(), test.T850_SubClassing.My_New_Mover::apply(), auto-DRRAFTER_setup::auto_setup_helices(), options.KeepSameFile::close(), make_bindings_via_cmake::compile_sources(), build::create_package(), build::create_wheel(), pyrosetta.bindings.pose::display_secstruct(), test.T900_distributed::e(), DRRAFTER::estimate_error(), test.T870_SubClassing_EnergyMethods2.CI2B_Method::eval_intrares_energy(), test.T870_SubClassing_EnergyMethods2.CD2B_Method::eval_intrares_energy(), self-test::execute(), build::execute(), DRRAFTER_util::extract_lowscore_decoys(), auto-DRRAFTER_setup_next_round::figure_out_next_round(), finalize_models::finalize(), demo.D030_Fold_tree::fold_tree(), build::generate_bindings(), build::generate_documentation(), DRRAFTER::get_coord_csts(), auto-DRRAFTER_setup_next_round::get_results(), auto-DRRAFTER_setup_next_round::get_results_and_setup_next_round(), auto-DRRAFTER_setup_next_round::get_silent_file_subset(), demo.D060_Folding::guess_disulfides(), pyrosetta::init(), build::install_llvm_tool(), build::install_pybind11(), pyrosetta.PyMOLRosettaServer.PR_UDPServer::listen(), PyMOL-RosettaServer.PR_UDPServer::listen(), pyrosetta.toolbox.load_ligand::load_from_pubchem(), options::main(), self-test::main(), sphinx-doc-generator::main(), build::main(), pyrosetta.PyMOLRosettaServer::main(), PyMOL-RosettaServer::main(), make_bindings_via_cmake::make_bindings_code(), submit_jobs::make_job_files_and_submit(), self-test::mfork(), demo.D040_Movemap::movemap(), test.T007_TracerIO.MyPyTracer::output_callback(), demo.D050_Packer_task::packer_task(), DRRAFTER::parse_fasta(), DRRAFTER_util::pdbslice(), demo.D020_Pose_scoring::pose_scoring(), demo.D010_Pose_structure::pose_structure(), fmt::BufferedFile::print(), print(), pyrosetta.toolbox.atom_pair_energy::print_atom_pair_energy_table(), print_colored(), pyrosetta.toolbox.atom_pair_energy::print_residue_pair_energies(), pyrosetta.PyMOLRosettaServer.PR_PyMOLServer::process_packet(), PyMOL-RosettaServer.PR_PyMOLServer::process_packet(), test.T850_SubClassing.PyOverloadTest::pure_test_ref(), DRRAFTER_util::renumber_pdb(), erraser_util::res_wise_rmsd(), pyrosetta.toolbox.numpy_utils::rigid_transform_3D(), DRRAFTER_util::rna_helix(), self-test::run_test(), demo.D070_Refinement::sample_refinement(), demo.D090_Ala_scan::scanning(), pyrosetta.toolbox.load_ligand::sdf2mdl(), pyrosetta.PyMOLRosettaServer::set_spectrum(), PyMOL-RosettaServer::set_spectrum(), DRRAFTER::setup_job(), drrafter_rna::setup_next_round(), pyrosetta.PyMOLRosettaServer::start_rosetta_server(), PyMOL-RosettaServer::start_rosetta_server(), submit_jobs::submit_jobs(), and build::update_source_file().

FMT_API void fmt::print ( CStringRef  format_str,
ArgList  args 
)

Prints formatted data to stdout.

Example**::

print("Elapsed time: {0:.2f} seconds", 1.23);

References print().

FMT_API void fmt::print_colored ( Color  c,
CStringRef  format,
ArgList  args 
)

Formats a string and prints it to stdout using ANSI escape sequences to specify color (experimental). Example: print_colored(fmt::RED, "Elapsed time: {0:.2f} seconds", 1.23);

References print().

FMT_API void fmt::report_system_error ( int  error_code,
fmt::StringRef  message 
)

Variable Documentation

FMT_GCC_EXTENSION typedef long long fmt::LongLong

Referenced by fmt::File::size().

FMT_GCC_EXTENSION typedef unsigned long long fmt::ULongLong

Referenced by fmt::File::size().