//////////////////////////////////////////////////////////////////////////////// // The Loki Library // Copyright (c) 2005 Peter Kümmel // Permission to use, copy, modify, distribute and sell this software for any // purpose is hereby granted without fee, provided that the above copyright // notice appear in all copies and that both that copyright notice and this // permission notice appear in supporting documentation. // The author makes no representations about the // suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. //////////////////////////////////////////////////////////////////////////////// // $Header: /diskb/tmp/stefano/project2/CVS/ACS/LGPL/Tools/loki/ws/src/lokiOrderedStatic.cpp,v 1.3 2007/02/22 09:00:32 bjeram Exp $ #include #ifndef MAKE_VXWORKS #include #endif #ifdef min #undef min #endif #ifdef max #undef max #endif namespace Loki { namespace Private { OrderedStaticCreatorFunc::OrderedStaticCreatorFunc() { } OrderedStaticCreatorFunc::~OrderedStaticCreatorFunc() { } OrderedStaticManagerClass::OrderedStaticManagerClass() : staticObjects_(), // there is no std::numeric_limits<> or VxWorks #ifndef MAKE_VXWORKS max_longevity_(std::numeric_limits::min()), min_longevity_(std::numeric_limits::max()) #else max_longevity_(0), min_longevity_(__INT_MAX__* 2U + 1) #endif { } OrderedStaticManagerClass::~OrderedStaticManagerClass() { } void OrderedStaticManagerClass::createObjects() { for(unsigned int longevity=max_longevity_; longevity>=min_longevity_; longevity--) { for(unsigned int i=0; imax_longevity_) max_longevity_=l; if(l