FedRegion.cc

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 // CERTI - HLA RunTime Infrastructure
00003 // Copyright (C) 2002-2005  ONERA
00004 //
00005 // This file is part of CERTI-libCERTI
00006 //
00007 // CERTI-libCERTI is free software ; you can redistribute it and/or
00008 // modify it under the terms of the GNU Lesser General Public License
00009 // as published by the Free Software Foundation ; either version 2 of
00010 // the License, or (at your option) any later version.
00011 //
00012 // CERTI-libCERTI is distributed in the hope that it will be useful, but
00013 // WITHOUT ANY WARRANTY ; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015 // Lesser General Public License for more details.
00016 //
00017 // You should have received a copy of the GNU Lesser General Public
00018 // License along with this program ; if not, write to the Free Software
00019 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020 // USA
00021 //
00022 // $Id: FedRegion.cc,v 3.5 2007/07/06 09:25:17 erk Exp $
00023 // ----------------------------------------------------------------------------
00024 
00025 
00026 #include "FedRegion.hh"
00027 
00028 using std::vector ;
00029 
00030 namespace certi {
00031 
00032 // ----------------------------------------------------------------------------
00033 FedRegion::FedRegion(RegionHandle h, SpaceHandle s, const std::vector<Extent> &ext)
00034     : BaseRegion(h), space(s), coExtents(ext)
00035 {
00036     setExtents(ext);
00037 }
00038 
00039 // ----------------------------------------------------------------------------
00040 FedRegion::~FedRegion()
00041 {
00042 }
00043 
00044 // ----------------------------------------------------------------------------
00047 SpaceHandle
00048 FedRegion::getSpaceHandle() const
00049     throw ()
00050 {
00051     return space ;
00052 }
00053 
00054 // ----------------------------------------------------------------------------
00055 ULong
00056 FedRegion::getRangeLowerBound(ExtentIndex index,
00057                    DimensionHandle dimension) const
00058     throw (ArrayIndexOutOfBounds)
00059 {
00060     return BaseRegion::getRangeLowerBound(index, dimension);
00061 }
00062 
00063 // ----------------------------------------------------------------------------
00064 ULong
00065 FedRegion::getRangeUpperBound(ExtentIndex index,
00066                    DimensionHandle dimension) const
00067     throw (ArrayIndexOutOfBounds)
00068 {
00069     return BaseRegion::getRangeUpperBound(index, dimension);
00070 }
00071 
00072 // ----------------------------------------------------------------------------
00073 void
00074 FedRegion::setRangeLowerBound(ExtentIndex index,
00075                    DimensionHandle dimension,
00076                    ULong val)
00077     throw (ArrayIndexOutOfBounds)
00078 {
00079     BaseRegion::setRangeLowerBound(index, dimension, val);
00080 }
00081 
00082 // ----------------------------------------------------------------------------
00083 void
00084 FedRegion::setRangeUpperBound(ExtentIndex index,
00085                    DimensionHandle dimension,
00086                    ULong val)
00087     throw (ArrayIndexOutOfBounds)
00088 {
00089     BaseRegion::setRangeUpperBound(index, dimension, val);
00090 }
00091 
00092 // ----------------------------------------------------------------------------
00093 // getRangeLowerBoundNotificationLimit
00094 //
00095 ULong
00096 FedRegion::getRangeLowerBoundNotificationLimit(ExtentIndex index,
00097                                                DimensionHandle dimension) const
00098     throw (ArrayIndexOutOfBounds)
00099 {
00100     if (index >= coExtents.size()) {
00101         throw ArrayIndexOutOfBounds("");
00102     }
00103     else {
00104         return coExtents[index].getRangeLowerBound(dimension);
00105     }
00106 }
00107 
00108 // ----------------------------------------------------------------------------
00109 // getRangeUpperBoundNotificationLimit
00110 //
00111 ULong
00112 FedRegion::getRangeUpperBoundNotificationLimit(ExtentIndex index,
00113                                                DimensionHandle dimension) const
00114     throw (ArrayIndexOutOfBounds)
00115 {
00116     if (index >= coExtents.size()) {
00117         throw ArrayIndexOutOfBounds("");
00118     }
00119     else {
00120         return coExtents[index].getRangeUpperBound(dimension);
00121     }
00122 }
00123 
00124 // ----------------------------------------------------------------------------
00125 ULong
00126 FedRegion::getNumberOfExtents() const
00127     throw ()
00128 {
00129     return BaseRegion::getNumberOfExtents();
00130 }
00131 
00132 // ----------------------------------------------------------------------------
00135 void
00136 FedRegion::commit()
00137 {
00138     replaceExtents(coExtents);
00139 }
00140 
00141 } // namespace certi
00142 
00143 // $Id: FedRegion.cc,v 3.5 2007/07/06 09:25:17 erk Exp $

Generated on Thu Apr 30 15:53:49 2009 for CERTIDeveloperDocumentation by doxygen 1.5.5