2 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
5 TAO_MProfile::TAO_MProfile (CORBA::ULong sz)
7 is_policy_list_initialized_ (false),
18 TAO_MProfile::TAO_MProfile (const TAO_MProfile &mprofiles)
20 is_policy_list_initialized_ (false),
27 this->set (mprofiles);
30 ACE_INLINE TAO_MProfile&
31 TAO_MProfile::operator= (const TAO_MProfile& rhs)
40 /// Cyclic get next. It will simply cycle through the complete list.
41 ACE_INLINE TAO_Profile *
42 TAO_MProfile::get_cnext (void)
47 if (current_ == last_)
50 return pfiles_[current_++];
53 /// This will return the next element until either null is found or the
54 /// end of list. It then continues to return NULL until rewind.
55 ACE_INLINE TAO_Profile *
56 TAO_MProfile::get_next (void)
58 // Nolist or EndOfList
59 if (last_ == 0 || current_ == last_)
62 return pfiles_[current_++];
65 ACE_INLINE TAO_Profile *
66 TAO_MProfile::get_cprev (void)
72 else if (current_ > 1)
74 else // current_ == 0 or 1, 0 => list never read before and == 1
77 return pfiles_[current_ - 1];
80 ACE_INLINE TAO_Profile *
81 TAO_MProfile::get_prev (void)
83 if (last_ == 0 || current_ <= 1)
84 // No List of BeginningOfList
89 return pfiles_[current_ - 1];
92 // does not affect the current_ setting!
93 ACE_INLINE TAO_Profile *
94 TAO_MProfile::get_profile (TAO_PHandle handle)
97 return pfiles_[handle];
102 ACE_INLINE TAO_Profile *
103 TAO_MProfile::get_current_profile (void)
108 // means list has not been read before.
111 return pfiles_[current_ - 1];
114 ACE_INLINE TAO_PHandle
115 TAO_MProfile::get_current_handle (void)
123 ACE_INLINE TAO_PHandle
124 TAO_MProfile::get_current_handle () const
133 TAO_MProfile::rewind (void)
139 TAO_MProfile::give_profile (TAO_Profile *pfile, int share)
142 return this->give_shared_profile(pfile);
143 // skip by the used slots
144 if (last_ == size_) // full!
147 pfiles_[last_++] = pfile;
154 TAO_MProfile::forward_from (TAO_MProfile *from)
156 this->forward_from_ = from;
161 TAO_MProfile::forward_from (void)
163 return this->forward_from_;
166 ACE_INLINE CORBA::ULong
167 TAO_MProfile::profile_count () const
172 ACE_INLINE CORBA::ULong
173 TAO_MProfile::size () const
178 ACE_INLINE const TAO_Profile*
179 TAO_MProfile::get_profile (CORBA::ULong slot) const
181 if (slot >= this->last_)
183 return this->pfiles_[slot];
186 ACE_INLINE TAO_Profile **
187 TAO_MProfile::pfiles () const
189 return this->pfiles_;
193 TAO_MProfile::policy_list (CORBA::PolicyList *policy_list)
195 this->policy_list_ = policy_list;
198 TAO_END_VERSIONED_NAMESPACE_DECL