Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Omniifr::PrimitiveDef_impl Class Reference

#include <PrimitiveDef.h>

Inheritance diagram for Omniifr::PrimitiveDef_impl:

Inheritance graph
[legend]
Collaboration diagram for Omniifr::PrimitiveDef_impl:

Collaboration graph
[legend]
List of all members.

Public Member Functions

CORBA::PrimitiveKind kind ()
CORBA::DefinitionKind def_kind ()
void destroy ()
 Always throws BAD_INV_ORDER/ObjectIndestructible.
CORBA::TypeCode_ptr type ()
 PrimitiveDef_impl (CORBA::PrimitiveKind kind)
virtual ~PrimitiveDef_impl ()
void uncheckedDestroy ()
 Destroys this object, without first checking for dependencies.
void output (ostream &os)
 Primitive types do not need to be stored.

Private Attributes

CORBA::PrimitiveKind _kind

Constructor & Destructor Documentation

Omniifr::PrimitiveDef_impl::PrimitiveDef_impl CORBA::PrimitiveKind  kind  ) 
 

Definition at line 79 of file PrimitiveDef.cc.

References _kind, and Omniifr::IRObject_impl::activateObjectWithId().

00080 : _kind(kind)
00081 {
00082   switch(_kind)
00083   {
00084     case pk_null:       throw BAD_PARAM();
00085     case pk_void:       activateObjectWithId("pk_void"      ); break;
00086     case pk_short:      activateObjectWithId("pk_short"     ); break;
00087     case pk_long:       activateObjectWithId("pk_long"      ); break;
00088     case pk_ushort:     activateObjectWithId("pk_ushort"    ); break;
00089     case pk_ulong:      activateObjectWithId("pk_ulong"     ); break;
00090     case pk_float:      activateObjectWithId("pk_float"     ); break;
00091     case pk_double:     activateObjectWithId("pk_double"    ); break;
00092     case pk_boolean:    activateObjectWithId("pk_boolean"   ); break;
00093     case pk_char:       activateObjectWithId("pk_char"      ); break;
00094     case pk_octet:      activateObjectWithId("pk_octet"     ); break;
00095     case pk_any:        activateObjectWithId("pk_any"       ); break;
00096     case pk_TypeCode:   activateObjectWithId("pk_TypeCode"  ); break;
00097     case pk_Principal:  activateObjectWithId("pk_Principal" ); break;
00098     case pk_string:     activateObjectWithId("pk_string"    ); break;
00099     case pk_objref:     activateObjectWithId("pk_objref"    ); break;
00100 #ifdef HAS_LongLong
00101     case pk_longlong:   activateObjectWithId("pk_longlong"  ); break;
00102     case pk_ulonglong:  activateObjectWithId("pk_ulonglong" ); break;
00103 #endif
00104 #ifdef HAS_LongDouble
00105     case pk_longdouble: activateObjectWithId("pk_longdouble"); break;
00106 #endif
00107     case pk_wchar:      activateObjectWithId("pk_wchar"     ); break;
00108     case pk_wstring:    activateObjectWithId("pk_wstring"   ); break;
00109     case pk_value_base: throw NO_IMPLEMENT();
00110 
00111     // Omit default in order that GCC's -Wall will tell us when cases are
00112     // missing.
00113   }
00114 }

virtual Omniifr::PrimitiveDef_impl::~PrimitiveDef_impl  )  [inline, virtual]
 

Definition at line 48 of file PrimitiveDef.h.

00048 {}


Member Function Documentation

CORBA::DefinitionKind Omniifr::PrimitiveDef_impl::def_kind  )  [inline, virtual]
 

Implements Omniifr::IRObject_impl.

Definition at line 37 of file PrimitiveDef.h.

00037 {return CORBA::dk_Primitive;}

void Omniifr::PrimitiveDef_impl::destroy  )  [virtual]
 

Always throws BAD_INV_ORDER/ObjectIndestructible.

Reimplemented from Omniifr::IRObject_impl.

Definition at line 30 of file PrimitiveDef.cc.

References IFELSE_OMNIORB4.

00031 {
00032   // Specification dictates the following exception:
00033   throw CORBA::BAD_INV_ORDER(
00034     IFELSE_OMNIORB4(omni::BAD_INV_ORDER_ObjectIndestructible,2),
00035     CORBA::COMPLETED_NO
00036   );
00037 }

CORBA::PrimitiveKind Omniifr::PrimitiveDef_impl::kind  )  [inline]
 

Definition at line 35 of file PrimitiveDef.h.

References _kind.

00035 {return _kind;}

void Omniifr::PrimitiveDef_impl::output ostream &  os  )  [inline, virtual]
 

Primitive types do not need to be stored.

Implements Omniifr::IRObject_impl.

Definition at line 50 of file PrimitiveDef.h.

TypeCode_ptr Omniifr::PrimitiveDef_impl::type  )  [virtual]
 

Implements Omniifr::IDLType_impl.

Definition at line 39 of file PrimitiveDef.cc.

References _kind.

00040 {
00041   // cannot be pk_null
00042   switch(_kind)
00043   {
00044     case pk_null:       return TypeCode::_nil();
00045     case pk_void:       return TypeCode::_duplicate( _tc_void );
00046     case pk_short:      return TypeCode::_duplicate( _tc_short );
00047     case pk_long:       return TypeCode::_duplicate( _tc_long );
00048     case pk_ushort:     return TypeCode::_duplicate( _tc_ushort );
00049     case pk_ulong:      return TypeCode::_duplicate( _tc_ulong );
00050     case pk_float:      return TypeCode::_duplicate( _tc_float );
00051     case pk_double:     return TypeCode::_duplicate( _tc_double );
00052     case pk_boolean:    return TypeCode::_duplicate( _tc_boolean );
00053     case pk_char:       return TypeCode::_duplicate( _tc_char );
00054     case pk_octet:      return TypeCode::_duplicate( _tc_octet );
00055     case pk_any:        return TypeCode::_duplicate( _tc_any );
00056     case pk_TypeCode:   return TypeCode::_duplicate( _tc_TypeCode );
00057     case pk_Principal:  return TypeCode::_duplicate( _tc_Principal );
00058     case pk_string:     return TypeCode::_duplicate( _tc_string );
00059     case pk_objref:     return TypeCode::_duplicate( _tc_Object );
00060 #ifdef HAS_LongLong
00061     case pk_longlong:   return TypeCode::_duplicate( _tc_longlong );
00062     case pk_ulonglong:  return TypeCode::_duplicate( _tc_ulonglong );
00063 #endif
00064 #ifdef HAS_LongDouble
00065     case pk_longdouble: return TypeCode::_duplicate( _tc_longdouble );
00066 #endif
00067     case pk_wchar:      return TypeCode::_duplicate( _tc_wchar );
00068     case pk_wstring:    return TypeCode::_duplicate( _tc_wstring );
00069     case pk_value_base: throw NO_IMPLEMENT(); //?? return TypeCode::_duplicate( ?? );
00070 
00071     // Omit default in order that GCC's -Wall will tell us when cases are
00072     // missing.
00073   }
00074   assert(0);
00075   return TypeCode::_nil();
00076 }

void Omniifr::PrimitiveDef_impl::uncheckedDestroy  )  [inline, virtual]
 

Destroys this object, without first checking for dependencies.

Implements Omniifr::IRObject_impl.

Definition at line 49 of file PrimitiveDef.h.

00049 {}


Member Data Documentation

CORBA::PrimitiveKind Omniifr::PrimitiveDef_impl::_kind [private]
 

Definition at line 45 of file PrimitiveDef.h.

Referenced by kind(), PrimitiveDef_impl(), and type().


The documentation for this class was generated from the following files:
Generated on Fri Mar 4 13:04:06 2005 for OmniIFR by  doxygen 1.4.1