DbOutput Class Reference

Base class for all output formats. More...

#include <CifSchemaMap.h>

Inherited by BcpOutput, SqlOutput, and XmlOutput.

Inheritance diagram for DbOutput:

Inheritance graph
[legend]
Collaboration diagram for DbOutput:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 DbOutput (Db &db)
virtual ~DbOutput ()
virtual void WriteSchema (const string &path=String::Empty)
virtual void WriteDataLoadingScripts (const string &path=String::Empty)
virtual void WriteData (Block &block, const string &path=String::Empty)
void SetInputFile (const string &inpFile)
const string & GetCommandScriptName ()

Public Attributes

Db_db

Protected Member Functions

void WriteDbExec (ostream &io, const string &fileName, const unsigned int indentLevel=0)
void WriteDbExecOnly (ostream &io, const string &fileName, const unsigned int indentLevel=1)
void WriteHeader (ostream &io)
void _FormatNumericData (ostream &io, const string &cs)
void _FormatStringData (ostream &io, const string &cs, unsigned int maxWidth)
void _FormatTextData (ostream &io, const string &cs)
void _FormatDateData (ostream &io, const string &cs, unsigned int maxWidth)
void _FormatData (ostream &io, const string &cs, ATTRIBINFO &attribInfo, const bool noRevise)
bool IsSpecialChar (const char &character)
bool IsSpecialDateChar (const char &character)
virtual void WriteEmptyNumeric (ostream &io)
virtual void WriteEmptyString (ostream &io)
virtual void WriteSpecialChar (ostream &io, const char &specChar)
virtual void WriteEmptyDate (ostream &io)
virtual void WriteSpecialDateChar (ostream &io, const char &specDateChar)
virtual bool IsFirstTextNewLineSpecial ()
virtual void WriteNewLine (ostream &io, bool special=false)
virtual void GetTableStart (string &tableStart, const string &tableName)
virtual void GetTableEnd (string &tableEnd)
const string & GetItemSeparator ()
const string & GetRowSeparator ()
virtual void _WriteTable (ostream &io, ISTable *tIn, bool noRevise=false)
void GetMasterIndexAttribValue (string &masterIndexAttribValue, Block &block, const string &masterIndexAttribName, const vector< string > &tableNames)

Protected Attributes

string _SCHEMA_FILE
string _INPUT_FILE
string _stringDelimiter
vector< char > _specialChars
string _dateDelimiter
vector< char > _specialDateChars
string _itemSeparator
string _rowSeparator

Static Protected Attributes

static const string _DATA_LOADING_SCRIPT

Static Private Member Functions

static void _FormatStringDataSql (ostream &io, const string &cs, unsigned int maxWidth)

Detailed Description

Base class for all output formats.

This class encapsulates general characteristics of each kind of output. It contains virtual methods for generating the schema, data and loading scripts.


Constructor & Destructor Documentation

DbOutput::DbOutput ( Db db  ) 

DbOutput::~DbOutput (  )  [virtual]


Member Function Documentation

void DbOutput::WriteSchema ( const string &  path = String::Empty  )  [virtual]

Reimplemented in SqlOutput, and XmlOutput.

void DbOutput::WriteDataLoadingScripts ( const string &  path = String::Empty  )  [virtual]

Reimplemented in BcpOutput, and SqlOutput.

void DbOutput::WriteData ( Block &  block,
const string &  path = String::Empty 
) [virtual]

Reimplemented in BcpOutput, SqlOutput, and XmlOutput.

void DbOutput::SetInputFile ( const string &  inpFile  ) 

const string & DbOutput::GetCommandScriptName (  ) 

void DbOutput::WriteDbExec ( ostream &  io,
const string &  fileName,
const unsigned int  indentLevel = 0 
) [protected]

void DbOutput::WriteDbExecOnly ( ostream &  io,
const string &  fileName,
const unsigned int  indentLevel = 1 
) [protected]

void DbOutput::WriteHeader ( ostream &  io  )  [protected]

void DbOutput::_FormatNumericData ( ostream &  io,
const string &  cs 
) [protected]

void DbOutput::_FormatStringData ( ostream &  io,
const string &  cs,
unsigned int  maxWidth 
) [protected]

void DbOutput::_FormatTextData ( ostream &  io,
const string &  cs 
) [protected]

void DbOutput::_FormatDateData ( ostream &  io,
const string &  cs,
unsigned int  maxWidth 
) [protected]

void DbOutput::_FormatData ( ostream &  io,
const string &  cs,
ATTRIBINFO attribInfo,
const bool  noRevise 
) [protected]

bool DbOutput::IsSpecialChar ( const char &  character  )  [protected]

bool DbOutput::IsSpecialDateChar ( const char &  character  )  [protected]

void DbOutput::WriteEmptyNumeric ( ostream &  io  )  [protected, virtual]

Reimplemented in SqlOutput.

void DbOutput::WriteEmptyString ( ostream &  io  )  [protected, virtual]

Reimplemented in BcpOutput, and SqlOutput.

void DbOutput::WriteSpecialChar ( ostream &  io,
const char &  specChar 
) [protected, virtual]

Reimplemented in XmlOutput.

void DbOutput::WriteEmptyDate ( ostream &  io  )  [protected, virtual]

Reimplemented in SqlOutput.

void DbOutput::WriteSpecialDateChar ( ostream &  io,
const char &  specDateChar 
) [protected, virtual]

Reimplemented in BcpOutput.

bool DbOutput::IsFirstTextNewLineSpecial (  )  [protected, virtual]

Reimplemented in SqlOutput.

void DbOutput::WriteNewLine ( ostream &  io,
bool  special = false 
) [protected, virtual]

Reimplemented in SqlOutput.

void DbOutput::GetTableStart ( string &  tableStart,
const string &  tableName 
) [protected, virtual]

Reimplemented in SqlOutput.

void DbOutput::GetTableEnd ( string &  tableEnd  )  [protected, virtual]

Reimplemented in SqlOutput.

const string & DbOutput::GetItemSeparator (  )  [protected]

const string & DbOutput::GetRowSeparator (  )  [protected]

void DbOutput::_WriteTable ( ostream &  io,
ISTable *  tIn,
bool  noRevise = false 
) [protected, virtual]

Reimplemented in XmlOutput.

void DbOutput::GetMasterIndexAttribValue ( string &  masterIndexAttribValue,
Block &  block,
const string &  masterIndexAttribName,
const vector< string > &  tableNames 
) [protected]

void DbOutput::_FormatStringDataSql ( ostream &  io,
const string &  cs,
unsigned int  maxWidth 
) [static, private]


Member Data Documentation

Db& DbOutput::_db

const string DbOutput::_DATA_LOADING_SCRIPT [static, protected]

string DbOutput::_SCHEMA_FILE [protected]

string DbOutput::_INPUT_FILE [protected]

string DbOutput::_stringDelimiter [protected]

vector<char> DbOutput::_specialChars [protected]

string DbOutput::_dateDelimiter [protected]

vector<char> DbOutput::_specialDateChars [protected]

string DbOutput::_itemSeparator [protected]

string DbOutput::_rowSeparator [protected]


The documentation for this class was generated from the following files:
Generated on Fri Feb 8 10:24:44 2008 for db-loader-v4.0 by  doxygen 1.5.1