NAMD
Public Member Functions | List of all members
PDBUnknown Class Reference

#include <PDBData.h>

Inheritance diagram for PDBUnknown:
PDBData

Public Member Functions

 PDBUnknown (const char *data)
 
virtual ~PDBUnknown (void)
 
void sprint (char *s, PDBFormatStyle usestyle)
 
- Public Member Functions inherited from PDBData
 PDBData (PDBType newtype)
 
virtual ~PDBData (void)
 
PDBType type (void)
 

Additional Inherited Members

- Public Types inherited from PDBData
enum  PDBType {
  HEADER, OBSLTE, COMPND, SOURCE,
  EXPDTA, AUTHOR, REVDAT, SPRSDE,
  JRNL, REMARK, SEQRES, FTNOTE,
  HET, FORMUL, HELIX, SHEET,
  TURN, SSBOND, SITE, CRYST1,
  ORIGX, SCALE, MTRIX, TVECT,
  MODEL, ATOM, HETATM, SIGATM,
  ANISOU, SIGUIJ, TER, ENDMDL,
  CONECT, MASTER, END, UNKNOWN
}
 
enum  PDBFormatStyle { COLUMNS, FIELDS }
 
- Static Public Attributes inherited from PDBData
static const char * PDBNames [UNKNOWN+1]
 
- Static Protected Member Functions inherited from PDBData
static void scan (const char *data, int len, int start, int size, int *ans, int defalt)
 
static void scan (const char *data, int len, int start, int size, BigReal *ans, BigReal defalt)
 
static void scan (const char *data, int len, int start, int size, char *ans)
 
static void field (const char *data, int fld, char *result)
 
static void sprintcol (char *s, int start, int len, const char *val)
 
static void sprintcol (char *s, int start, int len, int val)
 *** provide a simple way to print to a specific column More...
 
static void sprintcol (char *s, int start, int len, int prec, BigReal val)
 

Detailed Description

Definition at line 108 of file PDBData.h.

Constructor & Destructor Documentation

PDBUnknown::PDBUnknown ( const char *  data)
inline

Definition at line 112 of file PDBData.h.

References NAMD_die().

113  mystr = new char[strlen(data)+1];
114  if ( mystr == NULL )
115  {
116  NAMD_die("memory allocation failed in PDBUnknown::PDBUnknown");
117  }
118  strcpy(mystr, data);
119  }
PDBData(PDBType newtype)
Definition: PDBData.h:90
void NAMD_die(const char *err_msg)
Definition: common.C:83
virtual PDBUnknown::~PDBUnknown ( void  )
inlinevirtual

Definition at line 120 of file PDBData.h.

120  {
121  delete [] mystr;
122  }

Member Function Documentation

void PDBUnknown::sprint ( char *  s,
PDBFormatStyle  usestyle 
)
inlinevirtual

Reimplemented from PDBData.

Definition at line 123 of file PDBData.h.

References PDBData::COLUMNS.

123  {
124  strcpy(s, mystr);
125  if (usestyle == PDBData::COLUMNS) // they are the same, but I won't
126  strcpy( s, mystr); // get the stupid warning during
127  else // compilation
128  strcpy( s, mystr);
129  }

The documentation for this class was generated from the following file: