00001 // -*- C++ -*- 00002 // 00003 // $Id: ValueBase.inl 87936 2009-12-04 23:21:00Z dai_y $ 00004 00005 // Detection of flags in the CDR Stream 00006 00007 TAO_BEGIN_VERSIONED_NAMESPACE_DECL 00008 00009 ACE_INLINE CORBA::Boolean 00010 TAO_OBV_GIOP_Flags::is_null_ref (CORBA::Long tag) 00011 { 00012 return (tag == Null_tag); 00013 } 00014 00015 ACE_INLINE CORBA::Boolean 00016 TAO_OBV_GIOP_Flags::is_value_tag (CORBA::Long tag) 00017 { 00018 return ((tag & Value_tag_sigbits) == 0x7FFFFF00L); 00019 } 00020 00021 ACE_INLINE CORBA::Boolean 00022 TAO_OBV_GIOP_Flags:: has_codebase_url (CORBA::Long tag) 00023 { 00024 return (CORBA::Boolean) (tag & Codebase_url); 00025 } 00026 00027 ACE_INLINE CORBA::Boolean 00028 TAO_OBV_GIOP_Flags::has_no_type_info (CORBA::Long tag) 00029 { 00030 return ((tag & Type_info_sigbits) == Type_info_none); 00031 } 00032 00033 ACE_INLINE CORBA::Boolean 00034 TAO_OBV_GIOP_Flags::has_single_type_info (CORBA::Long tag) 00035 { 00036 return ((tag & Type_info_sigbits) == Type_info_single); 00037 } 00038 00039 ACE_INLINE CORBA::Boolean 00040 TAO_OBV_GIOP_Flags::has_list_type_info (CORBA::Long tag) 00041 { 00042 return ((tag & Type_info_sigbits) == Type_info_list); 00043 } 00044 00045 ACE_INLINE CORBA::Boolean 00046 TAO_OBV_GIOP_Flags:: is_chunked (CORBA::Long tag) 00047 { 00048 return (CORBA::Boolean) (tag & 8); 00049 } 00050 00051 ACE_INLINE CORBA::Boolean 00052 TAO_OBV_GIOP_Flags::is_indirection_tag (CORBA::Long tag) 00053 { 00054 return tag == Indirection_tag; 00055 } 00056 00057 00058 ACE_INLINE CORBA::Boolean 00059 TAO_OBV_GIOP_Flags::is_indirection (CORBA::Long value) 00060 { 00061 return (0x80000000L < static_cast<unsigned>(value) && 00062 static_cast<unsigned>(value) <= (0xFFFFFFFFL - 4)); 00063 } 00064 00065 00066 ACE_INLINE CORBA::Boolean 00067 TAO_OBV_GIOP_Flags::is_block_size (CORBA::Long value) 00068 { 00069 return (0 < static_cast<unsigned>(value) && 00070 static_cast<unsigned>(value) < 0x7FFFFF00L); 00071 } 00072 00073 ACE_INLINE CORBA::Boolean 00074 TAO_OBV_GIOP_Flags::is_end_tag (CORBA::Long tag) 00075 { 00076 return (0x80000000L < (unsigned)tag); 00077 } 00078 00079 TAO_END_VERSIONED_NAMESPACE_DECL