Archon::X3D::SAI Namespace Reference

Holds the implementation of the SAI (Scene Access Interface). More...


Classes

struct  ApplicationScene
struct  ChangeBase
struct  FieldSetChange
struct  FieldSetAtChange
struct  FieldListChange
struct  RouteChange
struct  Listener
struct  Orb
struct  ServantRef
struct  ExternalRouteHead
 Base class for head of standard routes. More...
struct  ExternalRoute
struct  Reader
struct  ApplicationSceneReaper
struct  Session
struct  CorbaVal
struct  CorbaVal< bool >
struct  CorbaVal< int >
struct  CorbaVal< long >
struct  CorbaVal< float >
struct  CorbaVal< double >
struct  CorbaVal< string >
struct  CorbaVal< Ref< NodeBase > >
struct  Porter

Functions

bool exceptionCatchInfo (Exception::Formatter format, string &result)
 Extract information from the last thrown exception.
string exceptionCatchShortExplanation ()
 Uses exceptionCatchInfo to generate a one-line description of the last thrown exception.
bool exceptionCatchInfo (Utilities::Exception::Formatter format, string &result)
 Extract information from the last thrown exception.


Detailed Description

Holds the implementation of the SAI (Scene Access Interface).

SAI is a part of the Extensible 3D (X3D) specification (ISO/IEC FDIS 19775:200x)

See also:
X3D
This is in fact the interface through which all communication between 3-D Console and its aplications go.

This implementation of SAI uses CORBA (Common Object Request Broker Architecture) as the protocol for communicating between server and clients/aplications. Using CORBA loosens the connection between server and applications in a desirable way. CORBA effectively provides us with a network and language independent API.

See also:
http://www.corba.org
Many different CORBA implementations exist. Archon currently uses OmniORB which we have found to be fast, robust and complete.

See also:
http://omniorb.sourceforge.net
The currently supported API is defined in the IDL (Interface Description Language) "sai.idl" found elsewhere in the Archon framework.


Function Documentation

bool Archon::X3D::SAI::exceptionCatchInfo Utilities::Exception::Formatter  format,
string &  result
[inline]
 

Extract information from the last thrown exception.

It re-throws the last thrown exception, and then attepts to catch any of the exception types known to this library. If this succeeds then the specified formatter is used to produce 'result' and true is returned. If the exception is unknown to this library then it just returns false.

This method is intended to be incorporated into similar methods in other libraries that interact with this library or in applications that need to check various different libraries for exceptions known to them.

Example:

   namespace MyApp
   {
     bool exceptionCatchInfo(Archon::Utilities::Exception::Formatter format,
                             string &result)
     {
       try { throw; }
       catch(MyFooException &e)
       {
         result = (*format)(typeid(e), "", e.getMessage())
"; } catch(MyBarException &e) { result = (*format)(typeid(e), e.getLocation(), "")
"; } catch(...) { return Archon::Utilities::exceptionCatchInfo(formatter, result) || SomeCoolLib::exceptionCatchInfo(formatter, result) || SomeShitLib::exceptionCatchInfo(formatter, result); } return true; } }

   int main(int argc, const char *argv[]) throw()
   {
     set_unexpected(Exception::terminal<MyApp::exceptionCatchInfo>);
     set_terminate(Exception::terminal<MyApp::exceptionCatchInfo>);
     ...
   }

 

Note:
If all your exceptions are derived from Archon::Utilities::Exception, then you do not need to write your own catchInfo function since Archon::Utilities::exceptionCatchInfo will know about it. If, on the other hand, you add new data to an exception derived from Utilities::Exception, and this data is not available through getMessage, you will need to provide your own exceptionCatchInfo to extract this data.
See also:
Exception::terminal

Definition at line 36 of file exception.H.

bool Archon::X3D::SAI::exceptionCatchInfo Utilities::Exception::Formatter  format,
string &  result
[inline]
 

Extract information from the last thrown exception.

It re-throws the last thrown exception, and then attepts to catch any of the exception types known to this library. If this succeeds then the specified formatter is used to produce 'result' and true is returned. If the exception is unknown to this library then it just returns false.

This method is intended to be incorporated into similar methods in other libraries that interact with this library or in applications that need to check various different libraries for exceptions known to them.

Example:

   namespace MyApp
   {
     bool exceptionCatchInfo(Archon::Utilities::Exception::Formatter format,
                             string &result)
     {
       try { throw; }
       catch(MyFooException &e)
       {
         result = (*format)(typeid(e), "", e.getMessage())
"; } catch(MyBarException &e) { result = (*format)(typeid(e), e.getLocation(), "")
"; } catch(...) { return Archon::Utilities::exceptionCatchInfo(formatter, result) || SomeCoolLib::exceptionCatchInfo(formatter, result) || SomeShitLib::exceptionCatchInfo(formatter, result); } return true; } }

   int main(int argc, const char *argv[]) throw()
   {
     set_unexpected(Exception::terminal<MyApp::exceptionCatchInfo>);
     set_terminate(Exception::terminal<MyApp::exceptionCatchInfo>);
     ...
   }

 

Note:
If all your exceptions are derived from Archon::Utilities::Exception, then you do not need to write your own catchInfo function since Archon::Utilities::exceptionCatchInfo will know about it. If, on the other hand, you add new data to an exception derived from Utilities::Exception, and this data is not available through getMessage, you will need to provide your own exceptionCatchInfo to extract this data.
See also:
Exception::terminal

Definition at line 40 of file exception.C.

References Archon::X3D::exceptionCatchInfo().

Referenced by Archon::Console3d::exceptionCatchInfo(), and exceptionCatchShortExplanation().

string Archon::X3D::SAI::exceptionCatchShortExplanation  ) 
 

Uses exceptionCatchInfo to generate a one-line description of the last thrown exception.

This is used to transport exceptions of unknown type across GIOP (General Inter-ORB Protocol.)

Definition at line 75 of file exception.C.

References exceptionCatchInfo(), Archon::Utilities::Exception::explainShort(), and Archon::Utilities::Exception::explainShortUnknown().


Generated on Sun Jul 30 23:03:31 2006 for Archon by  doxygen 1.4.4