CifFile Class Reference

#include <CifFile.h>

Inherited by DdlFile.

Inheritance diagram for CifFile:

Inheritance graph
[legend]
List of all members.

Public Types

enum  eQuoting { eSINGLE = 0, eDOUBLE }

Public Member Functions

 CifFile (const StringCompare::eCompareType caseSense=StringCompare::eCASE_SENSITIVE)
 CifFile (const eFileMode fileMode, const string &objFileName, const bool verbose=false, const StringCompare::eCompareType caseSense=StringCompare::eCASE_SENSITIVE, const unsigned int maxLineLength=STD_CIF_LINE_LENGTH, const string &nullValue=CifString::NullValue)
 ~CifFile ()
bool GetVerbose ()
void SetSmartPrint (bool smartPrint=true)
bool IsSmartPrint ()
void SetQuoting (eQuoting quoting)
unsigned int GetQuoting ()
int Write (const string &cifFileName, const bool sortTables=false, const bool writeEmptyTables=false)
int Write (ostream &cifo, const bool sortTables=false, const bool writeEmptyTables=false)
int Write (const string &cifFileName, const vector< string > &catOrder, const bool writeEmptyTables=false)
int Write (ostream &cifo, const vector< string > &catOrder, const bool writeEmptyTables=false)
int DataChecking (CifFile &ref)

Static Public Member Functions

static void GetItemNames (vector< string > &itemNames, ISTable &isTable)

Static Public Attributes

static const unsigned int STD_CIF_LINE_LENGTH = 80

Protected Types

enum  eIdentType { eNONE = 0, eLEFT, eRIGHT }

Protected Member Functions

int _IsQuotableText (const string &itemValue)
eIdentType _FindPrintType (const vector< string > &values)
void _PrintItemIdent (ostream &cifo, unsigned int &linePos)
void _PrintItemName (ostream &cifo, const string &category, const string &itemName, unsigned int &linePos)
void _PrintPostItemSeparator (ostream &cifo, unsigned int &linePos, const bool ident=false, const unsigned int numSpaces=1)
int _PrintItemValue (ostream &cifo, const string &itemValue, unsigned int &linePos, const eIdentType identType=eNONE, const unsigned int width=0)
int _PrintItemNameInHeader (ostream &cifo, const string &itemValue, unsigned int &linePos, const eIdentType identType=eNONE, const unsigned int width=0)
void _PrintHeaderedItems (ostream &cifo, const vector< string > &colNames, const vector< unsigned int > &colWidths, const vector< eIdentType > colPrintType)
int Write (ostream &cifo, vector< unsigned int > &tables, const bool writeEmptyTables=false)
int MandatoryCategoryChecking (CifFile &ref, ofstream &log)
int ItemsChecking (CifFile &ref, ofstream &log)

Protected Attributes

unsigned int _maxCifLineLength
string _nullValue
bool _verbose
bool _smartPrint
string _quotes

Static Protected Attributes

static const unsigned int STD_PRINT_SPACING = 3
static const unsigned int SMART_PRINT_SPACING = 1
static const unsigned int HEADER_SPACING = 40

Private Member Functions

void Init ()
void ConvertEscapedString (const string &inString, string &outString)

Member Enumeration Documentation

enum CifFile::eIdentType [protected]

Enumerator:
eNONE 
eLEFT 
eRIGHT 

enum CifFile::eQuoting

Enumerator:
eSINGLE 
eDOUBLE 


Constructor & Destructor Documentation

CifFile::CifFile ( const StringCompare::eCompareType  caseSense = StringCompare::eCASE_SENSITIVE  )  [inline]

CifFile::CifFile ( const eFileMode  fileMode,
const string &  objFileName,
const bool  verbose = false,
const StringCompare::eCompareType  caseSense = StringCompare::eCASE_SENSITIVE,
const unsigned int  maxLineLength = STD_CIF_LINE_LENGTH,
const string &  nullValue = CifString::NullValue 
)

CifFile::~CifFile (  )  [inline]


Member Function Documentation

void CifFile::Init (  )  [private]

void CifFile::ConvertEscapedString ( const string &  inString,
string &  outString 
) [private]

int CifFile::_IsQuotableText ( const string &  itemValue  )  [protected]

CifFile::eIdentType CifFile::_FindPrintType ( const vector< string > &  values  )  [protected]

void CifFile::_PrintItemIdent ( ostream &  cifo,
unsigned int &  linePos 
) [protected]

void CifFile::_PrintItemName ( ostream &  cifo,
const string &  category,
const string &  itemName,
unsigned int &  linePos 
) [protected]

void CifFile::_PrintPostItemSeparator ( ostream &  cifo,
unsigned int &  linePos,
const bool  ident = false,
const unsigned int  numSpaces = 1 
) [protected]

int CifFile::_PrintItemValue ( ostream &  cifo,
const string &  itemValue,
unsigned int &  linePos,
const eIdentType  identType = eNONE,
const unsigned int  width = 0 
) [protected]

int CifFile::_PrintItemNameInHeader ( ostream &  cifo,
const string &  itemValue,
unsigned int &  linePos,
const eIdentType  identType = eNONE,
const unsigned int  width = 0 
) [protected]

void CifFile::_PrintHeaderedItems ( ostream &  cifo,
const vector< string > &  colNames,
const vector< unsigned int > &  colWidths,
const vector< eIdentType colPrintType 
) [protected]

int CifFile::Write ( ostream &  cifo,
vector< unsigned int > &  tables,
const bool  writeEmptyTables = false 
) [protected]

int CifFile::MandatoryCategoryChecking ( CifFile ref,
ofstream &  log 
) [protected]

int CifFile::ItemsChecking ( CifFile ref,
ofstream &  log 
) [protected]

bool CifFile::GetVerbose (  )  [inline]

void CifFile::SetSmartPrint ( bool  smartPrint = true  )  [inline]

bool CifFile::IsSmartPrint (  )  [inline]

void CifFile::SetQuoting ( eQuoting  quoting  ) 

unsigned int CifFile::GetQuoting (  ) 

int CifFile::Write ( const string &  cifFileName,
const bool  sortTables = false,
const bool  writeEmptyTables = false 
)

int CifFile::Write ( ostream &  cifo,
const bool  sortTables = false,
const bool  writeEmptyTables = false 
)

int CifFile::Write ( const string &  cifFileName,
const vector< string > &  catOrder,
const bool  writeEmptyTables = false 
)

int CifFile::Write ( ostream &  cifo,
const vector< string > &  catOrder,
const bool  writeEmptyTables = false 
)

int CifFile::DataChecking ( CifFile ref  ) 

void CifFile::GetItemNames ( vector< string > &  itemNames,
ISTable &  isTable 
) [static]


Member Data Documentation

const unsigned int CifFile::STD_PRINT_SPACING = 3 [static, protected]

const unsigned int CifFile::SMART_PRINT_SPACING = 1 [static, protected]

const unsigned int CifFile::HEADER_SPACING = 40 [static, protected]

unsigned int CifFile::_maxCifLineLength [protected]

string CifFile::_nullValue [protected]

bool CifFile::_verbose [protected]

bool CifFile::_smartPrint [protected]

string CifFile::_quotes [protected]

const unsigned int CifFile::STD_CIF_LINE_LENGTH = 80 [static]


The documentation for this class was generated from the following files:
Generated on Mon Apr 2 09:28:57 2007 for cif-file-v1.0 by  doxygen 1.5.1