Archon::X3D::SAI::Session Struct Reference

Inheritance diagram for Archon::X3D::SAI::Session:

Inheritance graph
[legend]
Collaboration diagram for Archon::X3D::SAI::Session:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Session (Ref< Listener > listener, x3d::sai::Application_ptr)
 ~Session ()
x3d::sai::Session_ptr createServant (Time heartbeat)
 Create the Session CORBA servant.
unsigned long node2id (Ref< NodeBase >)
Ref< NodeBaseid2node (unsigned long) throw (IllegalNodeIdException)
char * getServerName ()
CORBA::Double getCurrentFrameRate ()
CORBA::ULong createApplicationScene (const char *, CORBA::Boolean)
CORBA::ULong loadApplicationScene (const char *, CORBA::Boolean)
void launchApplicationScene (CORBA::ULong)
void withdrawApplicationScene (CORBA::ULong)
void beginUpdate ()
void endUpdate ()
void print (const char *)
void setSynchronizedChangesEnabled (CORBA::Boolean)
void disposeBatch (const x3d::sai::DisposeSeq &, const x3d::sai::DisposeSeq &)
void disposeSession ()
 This method must effectively cause this session to self destruct.
char * getBaseUri (CORBA::ULong)
CORBA::ULong getRootGroup (CORBA::ULong)
void setRootGroup (CORBA::ULong, CORBA::ULong)
CORBA::ULong createNode (CORBA::ULong, const char *)
CORBA::ULong createNode (CORBA::ULong, CORBA::ULong)
CORBA::ULong getNode (CORBA::ULong, const char *)
void addRoute (CORBA::ULong, CORBA::ULong, CORBA::ULong, CORBA::ULong, CORBA::ULong)
void delRoute (CORBA::ULong, CORBA::ULong, CORBA::ULong, CORBA::ULong, CORBA::ULong)
CORBA::ULong createGroupFromStream (CORBA::ULong, x3d::sai::StreamReader_ptr)
void disposeContext (CORBA::ULong)
char * getNodeType (CORBA::ULong)
CORBA::ULong getField (CORBA::ULong, const char *)
void disposeNode (CORBA::ULong)
CORBA::ULong getFieldType (CORBA::ULong, CORBA::ULong)
char * getFieldName (CORBA::ULong, CORBA::ULong)
CORBA::ULong getFieldAccessType (CORBA::ULong, CORBA::ULong)
void registerFieldInterest (CORBA::ULong, CORBA::ULong, CORBA::ULong)
void unRegisterFieldInterest (CORBA::ULong, CORBA::ULong, CORBA::ULong)
x3d::sai::Value * getFieldValue (CORBA::ULong, CORBA::ULong)
void setFieldValue (CORBA::ULong, CORBA::ULong, const x3d::sai::Value &)
x3d::sai::Value * getFieldValueAt (CORBA::ULong, CORBA::ULong, CORBA::ULong)
void setFieldValueAt (CORBA::ULong, CORBA::ULong, CORBA::ULong, const x3d::sai::Value &)
void setFieldValueAdd (CORBA::ULong, CORBA::ULong, const x3d::sai::Value &)
void setFieldValueDel (CORBA::ULong, CORBA::ULong, const x3d::sai::Value &)
void disposeField (CORBA::ULong)
void executeChanges ()
void handleChange (Ref< const ChangeBase >)
void handleExternalEvent (const ValueBase *v, unsigned long cookie)
void addRouteHead (Ref< const ExternalRouteHead >)
void removeRouteHead (Ref< const ExternalRouteHead >)

Public Attributes

const BackRef< Listenerlistener

Classes

struct  ExternalEvent
struct  ExternalEventQueue
struct  Servant

Detailed Description

Definition at line 49 of file session.H.


Member Function Documentation

x3d::sai::Session_ptr Archon::X3D::SAI::Session::createServant Time  heartbeat  ) 
 

Create the Session CORBA servant.

Note:
Do not ignore the return value!!

Definition at line 424 of file session.C.

void Archon::X3D::SAI::Session::disposeSession  ) 
 

This method must effectively cause this session to self destruct.

Todo:
WE MUST MAKE SURE THAT THE APPLICATION IS NOT CONTACTED AT ALL AFTER THE DISPOSE_SESSION REQUEST HAS RETURNED TO THE APPLICATION.
THIS INCLUDES EVENT HANDLING, URI REQUESTING AND LOGGING.

Definition at line 636 of file session.C.

References listener.

CORBA::ULong Archon::X3D::SAI::Session::getRootGroup CORBA::ULong  ci  ) 
 

Todo:
This method is not in line with the X3D specification.
Also the fact that it must fail for cotexts which are not scenes is sub-optimal. Part of the sollution will be to introduce the scene interface into the SAI IDL as a sub-class of ExecutionContext.

Definition at line 665 of file session.C.

References Archon::Utilities::Ref< T >::get(), Archon::X3D::SceneBase::getRootGroup(), and node2id().

void Archon::X3D::SAI::Session::launchApplicationScene CORBA::ULong  ci  ) 
 

Todo:
We really should lock the mutex first.
Doing it the current way leaves the system in an invalid state if the Mutex locking throws an exception. First however, we need to create a graph showing the partial ordering between mutices. That is, whenever two or more mutices are aquired simultaniously we must decide which of the possible orders of acquisition is the only legal order.

Definition at line 552 of file session.C.

References Archon::Utilities::Ref< T >::get(), Archon::X3D::SAI::ApplicationScene::launch(), and listener.

void Archon::X3D::SAI::Session::setFieldValue CORBA::ULong  ni,
CORBA::ULong  fi,
const x3d::sai::Value &  v
 

Todo:
Add value type verification including checking the the concrete node type for conformance with the target field.
alternatively find a way to not replicating all the check from the field setters in NodeBase.

Definition at line 1017 of file session.C.

References Archon::X3D::NodeSequenceValue::begin(), Archon::X3D::NodeSequenceValue::end(), Archon::X3D::FieldBase::fetch(), Archon::Utilities::Ref< T >::get(), Archon::X3D::FieldBase::getIsEventSource(), Archon::X3D::FieldBase::getIsEventTarget(), Archon::X3D::FieldBase::getType(), handleChange(), id2node(), Archon::X3D::SAI::Porter::im(), n, and Archon::X3D::NodeValue::value.

void Archon::X3D::SAI::Session::setFieldValueAdd CORBA::ULong  ni,
CORBA::ULong  fi,
const x3d::sai::Value &  v
 

Todo:
Add value type verification including checking the the concrete node type for conformance with the target field.
alternatively find a way to not replicating all the check from the field setters in NodeBase.

Definition at line 1156 of file session.C.

References Archon::X3D::FieldBase::fetch(), Archon::Utilities::Ref< T >::get(), Archon::X3D::FieldBase::getIsEventSource(), Archon::X3D::FieldBase::getIsEventTarget(), Archon::X3D::FieldType::getSingleType(), Archon::X3D::FieldBase::getType(), handleChange(), id2node(), Archon::X3D::SAI::Porter::im(), n, and Archon::X3D::NodeValue::value.

void Archon::X3D::SAI::Session::setFieldValueAt CORBA::ULong  ni,
CORBA::ULong  fi,
CORBA::ULong  i,
const x3d::sai::Value &  v
 

Todo:
Add value type verification including checking the the concrete node type for conformance with the target field.
alternatively find a way to not replicating all the check from the field setters in NodeBase.

Definition at line 1105 of file session.C.

References Archon::X3D::FieldBase::fetch(), Archon::Utilities::Ref< T >::get(), Archon::X3D::FieldBase::getIsEventSource(), Archon::X3D::FieldBase::getIsEventTarget(), Archon::X3D::FieldType::getSingleType(), Archon::X3D::FieldBase::getType(), handleChange(), id2node(), Archon::X3D::SAI::Porter::im(), n, and Archon::X3D::NodeValue::value.

void Archon::X3D::SAI::Session::setFieldValueDel CORBA::ULong  ni,
CORBA::ULong  fi,
const x3d::sai::Value &  v
 

Todo:
Add value type verification including checking the the concrete node type for conformance with the target field.
alternatively find a way to not replicating all the check from the field setters in NodeBase.

Definition at line 1203 of file session.C.

References Archon::X3D::FieldBase::fetch(), Archon::Utilities::Ref< T >::get(), Archon::X3D::FieldBase::getIsEventSource(), Archon::X3D::FieldBase::getIsEventTarget(), Archon::X3D::FieldType::getSingleType(), Archon::X3D::FieldBase::getType(), handleChange(), id2node(), Archon::X3D::SAI::Porter::im(), n, and Archon::X3D::NodeValue::value.

void Archon::X3D::SAI::Session::setRootGroup CORBA::ULong  ci,
CORBA::ULong  ni
 

Todo:
This method is not in line with the X3D specification.
Also the fact that it must fail for cotexts which are not scenes is sub-optimal. Part of the sollution will be to introduce the scene interface into the SAI IDL as a sub-class of ExecutionContext.

Definition at line 680 of file session.C.

References Archon::Utilities::Ref< T >::get(), id2node(), n, and Archon::X3D::SceneBase::setRootGroup().

void Archon::X3D::SAI::Session::unRegisterFieldInterest CORBA::ULong  ni,
CORBA::ULong  fi,
CORBA::ULong  c
 

Todo:
MUST FLUSH OUTBOUND EVENT QUEUE WHERE AN UNREGISTER_FIELD_INTEREST REQUEST IS MADE.
THIS IS IMPORTANT FOR THE APPLICATION, SINCE IT NEEDS TO KNOW THAT THE REQUEST IS COMPLETE THEN NO MORE EVENTS FROM THAT SOURCE CAN ARRIVE.

Definition at line 963 of file session.C.

References Archon::X3D::SAI::ExternalRoute::del(), Archon::X3D::FieldBase::fetch(), Archon::Utilities::Ref< T >::get(), Archon::X3D::FieldBase::getIsEventSource(), id2node(), and n.


The documentation for this struct was generated from the following files:
Generated on Sun Jul 30 23:03:46 2006 for Archon by  doxygen 1.4.4