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: WriteTable Up: Methods Previous: OpenFile

CloseFile

NAME CloseFile

PROTOTYPE

#include "TblFileObj.h"
// this is defined in TblFileObj.h
//  static const int  MAKE_BIN = 1;      
//  static const int  DONT_MAKE_BIN = 0;  


void TblFileObj::CloseFile(int makeBinFile= MAKE_BIN,int shrink=0);

EXAMPLE

#include "TblFileObj.h"
int num;
char ** names;

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

s = new SSTable("MyTable");
FillTestTable(s, nRows, nCols, "ABCDEFGHIJKLMNOPQRSTUVWXYZ012345689");
fobjR->WriteTable(s,"MyDBlock","MyTable");
names =  fobjR->GetBlockNames(num);
for (int i=0; i<num; i++)
   cout<<names[i]<<endl;

fobjR->CloseFile(1);
if (fobjR) delete fobjR;
PURPOSE

CloseFile Writes modified tables into the binary file and closes that file if makeBinFile = 1, otherwise binary file is not created.

RECEIVES

*makeBinFile if this is set to 1, binary file will be created
*shrink indicates if file should be shrunk (suggestion-not use this atribute i.e leave it 0)

RETURN VALUE

None

REMARKS

None



Olivera Tosic
6/12/2002

 

© RCSB PDB