RCSB PDB Protein Data Bank A Member of the wwPDB
An Information Portal to Biological Macromolecular Structures
PDB Home | Contact Us
next up previous contents
Next: IsTablePresent Up: Methods Previous: CloseFile

WriteTable

NAME WriteTable

PROTOTYPE

#include "TblFileObj.h"

int TblFileObj::WriteTable(SSTable * s, 
                           const char *blockName, 
                           const char *tableName, 
                           int saveTablePtr=1);
int TblFileObj::WriteTable(SSTable * s, 
                           const char *tableName);

EXAMPLE

#include "TblFileObj.h"

TblFileObj * fobjR = new TblFileObj("./test/TESTFILE1", WRITE_MODE);

s = new SSTable("MyTable");
FillTestTable(s, nRows, nCols, "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345689");
fobjR->WriteTable(s,"MyDBlock","MyTable");
PURPOSE

WriteTable (SSTable *, const char *, const char *, int) puts the table in a list of tables in the TblFileObj object and writes table in the binary file specified by constructor for TblFileObj object. Table will have name tableName and will belong to datablock *blockName.

WriteTable (SSTable *, const char *) puts the table in a list of tables in the TblFileObj object and writes table in the binary file specified by constructor for TblFileObj object. Table will have name tableName and will belong to current datablock.

RECEIVES

WriteTable(SSTable *, const char *, const char *, int)
s Pointer to SSTable object
*blockName Name of datablock
*tableName Table name
saveTablePtr indicate if the poiter of table is saved for later use. Deafult value is 1. Recommendation: do not set it on 0

WriteTable(SSTable *, const char *)
s Pointer to SSTable object
*tableName Table name
RETURN VALUE

A negative value indicates an error or warning.

REMARKS

None  


next up previous contents
Next: IsTablePresent Up: Methods Previous: CloseFile
Olivera Tosic
6/12/2002

 

© RCSB PDB