DbiBinaryFile.cxx File Reference

#include <iostream>
#include "TClass.h"
#include "TObject.h"
#include "Api.h"
#include "TSystem.h"
#include "DatabaseInterface/DbiBinaryFile.h"
#include "DatabaseInterface/DbiTableRow.h"
#include "MessageService/MsgService.h"
#include "Validity/VldRange.h"
#include "Validity/VldTimeStamp.h"

Go to the source code of this file.

Defines

#define READ_BUILTIN(t)
#define WRITE_BUILTIN(t)
#define READ_SIMPLE(t)
#define WRITE_SIMPLE(t)

Enumerations

enum  Markers { StartMarker = 0xaabbccdd, EndMarker = 0xddbbccaa }

Functions

void * GetVTptr (const void *obj)
void SetVTptr (void *obj, const void *vt)
 CVSID ("$Id: DbiBinaryFile.cxx,v 1.11 2008/06/02 13:36:21 nwest Exp $")

Define Documentation

#define READ_BUILTIN (  ) 
Value:
\
DbiBinaryFile& DbiBinaryFile::operator >> (t& v) {        \
  UInt_t numBytes = sizeof(v);                            \
  char* bytes = reinterpret_cast<char*>(&v);              \
  this->Read(bytes,numBytes);                             \
  return *this;                                           \
}

Definition at line 126 of file DbiBinaryFile.cxx.

#define READ_SIMPLE (  ) 
Value:
\
DbiBinaryFile& DbiBinaryFile::operator >> (t& v) {        \
  void* vt = GetVTptr(&v);                                \
  UInt_t numBytes = sizeof(v);                            \
  char* bytes = reinterpret_cast<char*>(&v);              \
  this->Read(bytes,numBytes);                             \
  SetVTptr(&v,vt);                                        \
  return *this;                                           \
}

Definition at line 156 of file DbiBinaryFile.cxx.

#define WRITE_BUILTIN (  ) 
Value:
\
DbiBinaryFile& DbiBinaryFile::operator << (const t& v) {  \
  UInt_t numBytes = sizeof(v);                            \
  const char* bytes = reinterpret_cast<const char*>(&v);  \
  this->Write(bytes,numBytes);                            \
  return *this;                                           \
}

Definition at line 134 of file DbiBinaryFile.cxx.

#define WRITE_SIMPLE (  ) 
Value:
\
DbiBinaryFile& DbiBinaryFile::operator << (const t& v) {  \
  UInt_t numBytes = sizeof(v);                            \
  const char* bytes = reinterpret_cast<const char*>(&v);  \
  this->Write(bytes,numBytes);                            \
  return *this;                                           \
}

Definition at line 166 of file DbiBinaryFile.cxx.


Enumeration Type Documentation

enum Markers
Enumerator:
StartMarker 
EndMarker 

Definition at line 16 of file DbiBinaryFile.cxx.

00016              { StartMarker = 0xaabbccdd,
00017                EndMarker   = 0xddbbccaa};


Function Documentation

CVSID ( "$Id: DbiBinaryFile.  cxx,
v 1.11 2008/06/02 13:36:21 nwest Exp $"   
)
void* GetVTptr ( const void *  obj  ) 

Definition at line 22 of file DbiBinaryFile.cxx.

Referenced by DbiBinaryFile::operator>>().

00022                                 {
00023 
00024 //  Return an object's virtual table pointer.
00025 
00026   void* ptr;
00027   memcpy(&ptr,obj,4);
00028   return ptr;
00029 
00030 }

void SetVTptr ( void *  obj,
const void *  vt 
)

Definition at line 31 of file DbiBinaryFile.cxx.

Referenced by DbiBinaryFile::operator>>().

00031                                          {
00032 
00033 //  Set an object's virtual table pointer.
00034 
00035   memcpy(obj,&vt,4);
00036 
00037 }


Generated on 15 Jul 2018 for loon by  doxygen 1.6.1