Gromacs  2016.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Macros | Functions
txtdump.h File Reference
#include <cstdio>
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
+ Include dependency graph for txtdump.h:

Description

Declares helper functions for dumping basic data structures as text.

Macros

#define LINE_WIDTH   80
 Line width for text dump output.
 
#define RMARGIN   10
 Right margin for text dump output.
 
#define USE_WIDTH   ((LINE_WIDTH)-(RMARGIN))
 Actual line length for text dump output.
 
#define INDENT   3
 Default indentation for text dump output.
 

Functions

int pr_indent (FILE *fp, int n)
 Prints an initial indentation for a line.
 
int available (FILE *fp, const void *p, int indent, const char *title)
 Returns whether is available (not null), and prints a note if it is not.
 
int pr_title (FILE *fp, int indent, const char *title)
 Prints a title for a dumped section.
 
int pr_title_n (FILE *fp, int indent, const char *title, int n)
 Prints a title for a dumped section with a number suffixed.
 
int pr_title_nxn (FILE *fp, int indent, const char *title, int n1, int n2)
 Prints a title for a dumped section with two numbers suffixed (in NxM format).
 
void pr_reals (FILE *fp, int indent, const char *title, const real vec[], int n)
 Prints an array of reals.
 
void pr_doubles (FILE *fp, int indent, const char *title, const double *vec, int n)
 Prints an array of doubles.
 
void pr_reals_of_dim (FILE *fp, int indent, const char *title, const real *vec, int n, int dim)
 Prints an array of reals as a matrix with inner dimension dim.
 
void pr_int (FILE *fp, int indent, const char *title, int i)
 Prints an integer value.
 
void pr_int64 (FILE *fp, int indent, const char *title, gmx_int64_t i)
 Prints a gmx_int64_t value.
 
void pr_real (FILE *fp, int indent, const char *title, real r)
 Prints a floating-point value.
 
void pr_double (FILE *fp, int indent, const char *title, double d)
 Prints a double-precision floating-point value.
 
void pr_str (FILE *fp, int indent, const char *title, const char *s)
 Prints a string value.
 
void pr_strings (FILE *fp, int indent, const char *title, char ***nm, int n, gmx_bool bShowNumbers)
 Prints strings as a section; intended to be used for an array of names.