CORBA::TypeCode
implementation for the OMG IDL fixed types.
More...
#include <Fixed_TypeCode.h>
Inheritance diagram for TAO::TypeCode::Fixed< RefCountPolicy >:
@c TAO CORBA::TypeCode Template Methods | |
CORBA::TypeCode template methods specific to tk_fixed TypeCodes .
| |
virtual CORBA::Boolean | equal_i (CORBA::TypeCode_ptr tc) const |
virtual CORBA::Boolean | equivalent_i (CORBA::TypeCode_ptr tc) const |
virtual CORBA::TypeCode_ptr | get_compact_typecode_i (void) const |
virtual CORBA::UShort | fixed_digits_i (void) const |
virtual CORBA::UShort | fixed_scale_i (void) const |
CORBA::UShort const | digits_ |
The number of significant digits. | |
CORBA::UShort const | scale_ |
The scale factor. | |
Public Member Functions | |
Fixed (CORBA::UShort digits, CORBA::UShort scale) | |
Constructor. | |
TAO-specific @c CORBA::TypeCode Methods | |
virtual bool | tao_marshal (TAO_OutputCDR &cdr, CORBA::ULong offset) const |
Marshal this TypeCode into a CDR output stream. | |
virtual void | tao_duplicate (void) |
Increase the reference count on this TypeCode . | |
virtual void | tao_release (void) |
Decrease the reference count on this object. |
CORBA::TypeCode
implementation for the OMG IDL fixed types.
This class implements a CORBA::TypeCode
for the OMG IDL fixed
types.
Definition at line 43 of file Fixed_TypeCode.h.
|
Constructor.
Definition at line 9 of file Fixed_TypeCode.inl.
|
|
Implements CORBA::TypeCode. Definition at line 45 of file Fixed_TypeCode.cpp. References TAO::TypeCode::Fixed< RefCountPolicy >::digits_, and TAO::TypeCode::Fixed< RefCountPolicy >::scale_. Referenced by TAO::TypeCode::Fixed< RefCountPolicy >::equivalent_i().
00046 { 00047 // The following call won't throw since CORBA::TypeCode::equal() has 00048 // already established the kind of tc is the same as our kind. 00049 CORBA::UShort const tc_digits = tc->fixed_digits (); 00050 00051 CORBA::UShort const tc_scale = tc->fixed_scale (); 00052 00053 return (this->digits_ == tc_digits 00054 && this->scale_ == tc_scale); 00055 } |
|
Implements CORBA::TypeCode. Definition at line 59 of file Fixed_TypeCode.cpp. References TAO::TypeCode::Fixed< RefCountPolicy >::equal_i().
00060 { 00061 // Since TCKind comparisons must be performed before equal_i() is 00062 // called, we can also call it to determine equivalence of 00063 // tk_fixed TypeCodes. 00064 return this->equal_i (tc); 00065 } |
|
Reimplemented from CORBA::TypeCode. Definition at line 89 of file Fixed_TypeCode.cpp. References TAO::TypeCode::Fixed< RefCountPolicy >::digits_.
00090 { 00091 return this->digits_; 00092 } |
|
Reimplemented from CORBA::TypeCode. Definition at line 96 of file Fixed_TypeCode.cpp. References TAO::TypeCode::Fixed< RefCountPolicy >::scale_.
00097 { 00098 return this->scale_; 00099 } |
|
Implements CORBA::TypeCode. Definition at line 69 of file Fixed_TypeCode.cpp. References CORBA::TypeCode::_duplicate().
00070 { 00071 // Already compact since tk_fixed TypeCodes have no name or member 00072 // names, meaning that we can simply call _duplicate() on this 00073 // TypeCode. 00074 00075 00076 // @@ There is a potential problem here if this TypeCode is a static 00077 // and const since it may have been placed in read-only memory by 00078 // the compiler. A const_cast<> can return undefined results in 00079 // that case. 00080 00081 CORBA::TypeCode_ptr mutable_tc = 00082 const_cast<TAO::TypeCode::Fixed<RefCountPolicy> *> (this); 00083 00084 return CORBA::TypeCode::_duplicate (mutable_tc); 00085 } |
|
Increase the reference count on this
Implements CORBA::TypeCode. Definition at line 31 of file Fixed_TypeCode.cpp.
00032 { 00033 this->RefCountPolicy::add_ref (); 00034 } |
|
Marshal this
Marshal this
Implements CORBA::TypeCode. Definition at line 17 of file Fixed_TypeCode.cpp. References TAO::TypeCode::Fixed< RefCountPolicy >::digits_, and TAO::TypeCode::Fixed< RefCountPolicy >::scale_.
00019 { 00020 // A tk_fixed TypeCode has a "simple" parameter list type (see 00021 // Table 15-2 in Section 15.3.5.1 "TypeCode" in the CDR section of 00022 // the CORBA specification), meaning that its parameter(s) must be 00023 // marshaled immediately following the TCKind. No CDR encapsulation 00024 // is to be created. 00025 00026 return (cdr << this->digits_) && (cdr << this->scale_); 00027 } |
|
Decrease the reference count on this object.
Implements CORBA::TypeCode. Definition at line 38 of file Fixed_TypeCode.cpp.
00039 { 00040 this->RefCountPolicy::remove_ref (); 00041 } |
|
The number of significant digits.
Definition at line 86 of file Fixed_TypeCode.h. Referenced by TAO::TypeCode::Fixed< RefCountPolicy >::equal_i(), TAO::TypeCode::Fixed< RefCountPolicy >::fixed_digits_i(), and TAO::TypeCode::Fixed< RefCountPolicy >::tao_marshal(). |
|
The scale factor.
Definition at line 89 of file Fixed_TypeCode.h. Referenced by TAO::TypeCode::Fixed< RefCountPolicy >::equal_i(), TAO::TypeCode::Fixed< RefCountPolicy >::fixed_scale_i(), and TAO::TypeCode::Fixed< RefCountPolicy >::tao_marshal(). |