Sample_History.inl

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // $Id: Sample_History.inl 80826 2008-03-04 14:51:23Z wotte $
00004 
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006 
00007 ACE_INLINE int
00008 ACE_Sample_History::sample (ACE_UINT64 value)
00009 {
00010   if (this->sample_count_ >= this->max_samples_)
00011     return -1;
00012 
00013   this->samples_[this->sample_count_++] = value;
00014   return 0;
00015 }
00016 
00017 ACE_INLINE ACE_UINT64
00018 ACE_Sample_History::get_sample (size_t i) const
00019 {
00020   if (this->sample_count_ <= i)
00021     return 0;
00022 
00023   return this->samples_[i];
00024 }
00025 
00026 ACE_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:18:42 2010 for ACE by  doxygen 1.4.7