Public Member Functions | Public Attributes | List of all members
MyClass Class Reference

#include <MyClass.h>

Public Member Functions

 MyClass ()
 
 ~MyClass ()
 
void Streamer (TBuffer &rbuf)
 

Public Attributes

int myint =0
 
float myfloat = 0.0
 
TObject * myobj = nullptr
 
unsigned int readCount =0
 

Detailed Description

Definition at line 13 of file MyClass.h.

Constructor & Destructor Documentation

MyClass::MyClass ( )

Definition at line 13 of file MyClass.cxx.

13  {
14  cout << "Creating object." << endl;
15 }
QTextStream & endl(QTextStream &s)
MyClass::~MyClass ( )

Definition at line 17 of file MyClass.cxx.

17  {
18  cout << "Deleting object." << endl;
19  delete myobj;
20 }
TObject * myobj
Definition: MyClass.h:19
QTextStream & endl(QTextStream &s)

Member Function Documentation

void MyClass::Streamer ( TBuffer &  rbuf)

Definition at line 22 of file MyClass.cxx.

22  {
23  const string myname = "MyClass: ";
24  //TClass* pclass = MyClass::Class(); // With TObject?
25  TClass* pclass = TClass::GetClass("MyClass");
26  if ( buf.IsReading() ) {
27  if ( pclass == nullptr ) {
28  cout << myname << "Dictionary not found for read." << endl;
29  return;
30  }
31  cout << myname << "Reading object." << endl;
32  pclass->ReadBuffer(buf, this);
33  ++readCount;
34  } else {
35  if ( pclass == nullptr ) {
36  cout << myname << "Dictionary not found for write." << endl;
37  return;
38  }
39  cout << myname << "Writing object." << endl;
40  pclass->WriteBuffer(buf, this);
41  }
42 }
unsigned int readCount
Definition: MyClass.h:20
QTextStream & endl(QTextStream &s)

Member Data Documentation

float MyClass::myfloat = 0.0

Definition at line 18 of file MyClass.h.

int MyClass::myint =0

Definition at line 17 of file MyClass.h.

TObject* MyClass::myobj = nullptr

Definition at line 19 of file MyClass.h.

unsigned int MyClass::readCount =0

Definition at line 20 of file MyClass.h.


The documentation for this class was generated from the following files: