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: CifFileObj Public Method and Up: Methods Previous: Methods

Write

NAME Write

PROTOTYPE

#include "CifFileObjBase.h"
char *diags=NULL;

int CifFileObjBase::Write(const char * cifFileName,
                          int sortFlag =0, int emptyTable =0);
int CifFileObjBase::Write(const char * cifFileName,
                          ReVarCifArray<CifString> & catOrder,
                          int emptyTable =0);
EXAMPLE

#include "CifFileObjBase.h"
char * diags;

CifFileObjBase * fobjR = new CifFileObjBase("./test/TESTFILE1", WRITE_MODE);
   .
   .
   .
fobj->Write("./test/Test1.ocif");

#include "CifFileObjBase.h"
ReVarCifArray<CifString> catOrder;

fobjR = new CifFileObjBase("./test/Test.db", WRITE_MODE, 80, "?", 0);
   .
   .
   .
catOrder.Add("struct");
catOrder.Add("diffrn");
catOrder.Add("entity");

fobjR->Write("./test/Test.ocif",catOrder);
PURPOSE

Write(char *, char *&, int) writes CifFileObjBase object into a cif file, specified by cifFileName.
Write(char *, ReVarCifArray<CifString> &, int) writes CifFileObjBase object into a cif file, specified by cifFileName in a specified order catOrder.

RECEIVES

Write(char * , char *&, int)

cifFileName The name of output cif file
sortFlag If it zero, datablocks and table will be written in a original order, as they are created. If it 1 then datablocks, and tables in datablock will be in alfabetical order.
emptyTable If it zero, empty tables will not be written in a ciff file (tables with no rows). If it 1 then empty table will be writen as a table with one row, and all values will be nullChar (See Constuctor).

Write(char * , ReVarCifArray<CifString> &, int)

cifFileName The name of output cif file
catOrder List of cattegory(table) names which we want to write at the begining of cif file. Other tables will be written in original order.
emptyTable If it zero, empty tables will not be written in a ciff file (tables with no rows). If it 1 then empty table will be writen as a table with one row, and all values will be nullChar (See Constuctor).

RETURN VALUE

Returns 1 upon success, otherwise 0.

REMARKS

None


next up previous contents
Next: CifFileObj Public Method and Up: Methods Previous: Methods
Olivera Tosic
6/12/2002

 

© RCSB PDB