Salome HOME
NRI : Remove dependence with VISU.
[modules/kernel.git] / src / SALOMEDS / SALOMEDS_BasicAttributeFactory.cxx
1 using namespace std;
2 //=============================================================================
3 // File      : SALOMEDS_BasicAttributeFactory.cxx
4 // Created   : ven mai 31 13:45:47 CEST 2002
5 // Author    : Estelle Deville, CEA
6 // Project   : SALOME
7 // Copyright : CEA 2002
8 // $Header$
9 //=============================================================================
10
11 #include "SALOMEDS_BasicAttributeFactory.hxx"
12 #include "utilities.h"
13
14 //============================================================================
15 /*! Function : Create
16  *  Purpose  : create new basic attributes
17  */
18 //============================================================================
19 SALOMEDS_BasicAttribute_i* BasicAttributeFactory::Create(const char* type)
20     throw (SALOME_Exception)
21 {
22   if (!strcmp(type,"AttReal"))
23     {  
24       SALOMEDS_AttReal_i *A = new SALOMEDS_AttReal_i();
25       return A;
26     }
27   else if(!strcmp(type,"AttLong"))
28     {
29       SALOMEDS_AttLong_i *A = new SALOMEDS_AttLong_i();
30       return A;
31     }
32   else throw(SALOME_Exception(LOCALIZED("bad attribute type name")));
33
34 }