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: Diff Up: General Methods Previous: GetColumnIndex

Merge

NAME Merge

PROTOTYPE

#include "ISTable.h"

int ISTable::Merge(ISTable *sst,int typeOfMerge = 0);

EXAMPLE

#include <string.h>
#include <stdlib.h>
#include "ISTable.h"

ISTable * ss1 = new ISTable("MyTable1");
ISTable * ss2 = new ISTable("MyTable2");

... // add some columns and stuff

colName.Add("start_v");
ss1->CreateKey(colName);
ss2->PrintTable();
ss2->CreateKey(colName);
ss1->Merge(ss2,0);
  ...
}
PURPOSE

Merge updates table by merging it with sst. Tables have to have the same key in order to be merged. Depend on typeOfMerge data are overwritten (typeOfMerge=0) or overleped (typeOfMerge=1).

RECEIVES

sst Pointer to ISTable.
typeOfMerge integer that defines type of merge.

RETURN VALUE

A negative value means that an error has occured, i.e tables have different keys.

REMARKS

None  



Olivera Tosic
6/12/2002

 

© RCSB PDB