Revert "Minor modernization of DynamicAny code"
[ACE_TAO.git] / TAO / tao / String_Const_Sequence_Element_T.h
blobeb8505fb6971875ff592771cc844d286b9d1c9b0
1 #ifndef guard_string_const_sequence_element_hpp
2 #define guard_string_const_sequence_element_hpp
3 /**
4 * @file
6 * @brief Implement the type returned by const operator[] in string
7 * sequences.
9 * @author Carlos O'Ryan and Johnny Willemsen
12 #include "tao/Basic_Types.h"
14 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
16 namespace TAO
18 namespace details
20 template<typename traits>
21 class string_const_sequence_element
23 public:
24 typedef typename traits::char_type character_type;
25 typedef character_type * value_type;
26 typedef character_type const * const_value_type;
27 typedef typename traits::string_var string_var;
28 typedef typename traits::string_mgr string_mgr;
30 public:
31 string_const_sequence_element(value_type const & e, CORBA::Boolean release)
32 : element_(&e)
33 , release_(release)
37 string_const_sequence_element(
38 string_const_sequence_element const & rhs)
39 : element_(rhs.element_)
40 , release_(rhs.release_)
44 ~string_const_sequence_element() = default;
46 inline operator const_value_type() const
48 return *this->element_;
51 inline const character_type *in () const
53 return *this->element_;
56 CORBA::Boolean release() const
58 return this->release_;
61 private:
62 // This function is not implemented
63 string_const_sequence_element();
64 string_const_sequence_element & operator=(string_const_sequence_element const & rhs);
66 private:
67 const_value_type const * element_;
68 CORBA::Boolean const release_;
70 } // namespace details
71 } // namespace CORBA
73 TAO_END_VERSIONED_NAMESPACE_DECL
75 #endif // guard_string_const_sequence_element_hpp