Tobj


Name

Tobj — abstract base class for all classes in the SmartSockets C++ class library

Synopsis

(abstract base class) 

Inheritance

Description

The Tobj class unifies error handling by managing a status flag on behalf of derived classes.

Caution

None

Derived Classes

TipcConn, TipcMon, TipcMonClient, TipcMonServer, TipcMsg, TipcMt

Protected Construction/Destruction

Tobj::Tobj

Syntax:
Tobj();  
Remarks:
Create a Tobj base class.

Tobj::~Tobj

Syntax:
~Tobj(); 
Remarks:
Destroy a Tobj base class.

Public Member Functions

Tobj::Status

Syntax:
T_BOOL Status() const; 
Remarks:
Return the status of the object.

Operators

Tobj::operator!

Syntax:
T_BOOL operator!() const; 
Remarks:
Return the negated status of the object.

Example

This code example checks a status condition on a TipcMsg class object in two ways:

#include <rtworks/cxxipc.hxx> 
 
int main() 
{ 
  cout << "Create the message." << endl; 
 
  TipcMsg msg(T_MT_NUMERIC_DATA); 
 
  //  FIRST way to check error flag managed in Tobj base class    
  if (!msg) { 
    // error 
  } 
   
  //  SECOND way to check error flag managed in Tobj base class    
  if (msg.Status() == FALSE) { 
    // error 
  } 
} 

TIBCO SmartSockets™ cxxipc Class Library
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com