1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
// -------------------------------------------------------------------
// MAdLib - Copyright (C) 2008-2009 Universite catholique de Louvain
//
// See the Copyright.txt and License.txt files for license information.
// You should have received a copy of these files along with MAdLib.
// If not, see <http://www.madlib.be/license/>
//
// Please report all bugs and problems to <contrib@madlib.be>
//
// Authors: Jean-Francois Remacle, Gaetan Compere
// -------------------------------------------------------------------
#include "MAdModel.h"
namespace MAd {
Physical * MAdModel::getPhysical(int d, int t)
{
std::set<Physical *>::const_iterator it = physicals.begin();
for (; it != physicals.end(); it++)
{
if ( (*it)->dim() == d && (*it)->tag() == t ) return *it;
}
Physical * newp = new Physical(d,t);
physicals.insert(newp);
return newp;
}
}
|