File: MAdModel.cc

package info (click to toggle)
madlib 1.3.0-2.2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 6,912 kB
  • sloc: cpp: 39,850; sh: 10,088; makefile: 476
file content (30 lines) | stat: -rw-r--r-- 897 bytes parent folder | download | duplicates (3)
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;
  }

}