00001 // -*- C++ -*- 00002 00003 //============================================================================= 00004 /** 00005 * @file Fixed_TypeCode.h 00006 * 00007 * $Id: Fixed_TypeCode.h 76727 2007-01-30 11:16:45Z johnnyw $ 00008 * 00009 * Header file for @c CORBA::tk_fixed @c CORBA::TypeCodes. 00010 * 00011 * @author Ossama Othman <ossama@dre.vanderbilt.edu> 00012 */ 00013 //============================================================================= 00014 00015 #ifndef TAO_FIXED_TYPECODE_H 00016 #define TAO_FIXED_TYPECODE_H 00017 00018 #include /**/ "ace/pre.h" 00019 00020 #include "tao/AnyTypeCode/TypeCode.h" 00021 00022 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00023 # pragma once 00024 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00025 00026 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00027 00028 namespace TAO 00029 { 00030 namespace TypeCode 00031 { 00032 00033 /** 00034 * @class Fixed 00035 * 00036 * @brief @c CORBA::TypeCode implementation for the OMG IDL fixed 00037 * types. 00038 * 00039 * This class implements a @c CORBA::TypeCode for the OMG IDL @c 00040 * fixed types. 00041 */ 00042 template <class RefCountPolicy> 00043 class Fixed 00044 : public CORBA::TypeCode 00045 , private RefCountPolicy 00046 { 00047 public: 00048 00049 /// Constructor. 00050 Fixed (CORBA::UShort digits, CORBA::UShort scale); 00051 00052 /** 00053 * @name TAO-specific @c CORBA::TypeCode Methods 00054 * 00055 * Methods required by TAO's implementation of the 00056 * @c CORBA::TypeCode class. 00057 * 00058 * @see @c CORBA::TypeCode 00059 */ 00060 //@{ 00061 virtual bool tao_marshal (TAO_OutputCDR & cdr, CORBA::ULong offset) const; 00062 virtual void tao_duplicate (void); 00063 virtual void tao_release (void); 00064 //@} 00065 00066 protected: 00067 00068 /** 00069 * @name @c TAO CORBA::TypeCode Template Methods 00070 * 00071 * @c CORBA::TypeCode template methods specific to @c tk_fixed 00072 * @c TypeCodes. 00073 * 00074 * @see @c CORBA::TypeCode 00075 */ 00076 //@{ 00077 virtual CORBA::Boolean equal_i (CORBA::TypeCode_ptr tc) const; 00078 virtual CORBA::Boolean equivalent_i (CORBA::TypeCode_ptr tc) const; 00079 virtual CORBA::TypeCode_ptr get_compact_typecode_i (void) const; 00080 virtual CORBA::UShort fixed_digits_i (void) const; 00081 virtual CORBA::UShort fixed_scale_i (void) const; 00082 00083 private: 00084 00085 /// The number of significant digits. 00086 CORBA::UShort const digits_; 00087 00088 /// The scale factor. 00089 CORBA::UShort const scale_; 00090 00091 }; 00092 00093 } // End namespace TypeCode 00094 } // End namespace TAO 00095 00096 TAO_END_VERSIONED_NAMESPACE_DECL 00097 00098 00099 #ifdef __ACE_INLINE__ 00100 # include "tao/AnyTypeCode/Fixed_TypeCode.inl" 00101 #endif /* __ACE_INLINE__ */ 00102 00103 #ifdef ACE_TEMPLATES_REQUIRE_SOURCE 00104 # include "tao/AnyTypeCode/Fixed_TypeCode.cpp" 00105 #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ 00106 00107 #ifdef ACE_TEMPLATES_REQUIRE_PRAGMA 00108 # pragma implementation ("Fixed_TypeCode.cpp") 00109 #endif /* ACE_TEMPLATES_REQUIRE_PRAGMA */ 00110 00111 00112 #include /**/ "ace/post.h" 00113 00114 #endif /* TAO_FIXED_TYPECODE_H */