1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __GEOM_LIST_I_H__
21 #define __GEOM_LIST_I_H__
24 #include <SALOMEconfig.h>
25 #include CORBA_SERVER_HEADER(GEOM_Superv)
27 #include "GEOM_Gen_i.hh"
28 #include "utilities.h"
32 public virtual POA_GEOM::GEOM_List,
33 public virtual PortableServer::RefCountServantBase
37 GEOM_List_i(const Type& theListToCopy);
40 const Type& GetList();
42 template <class ElemType>
43 void AddObject(ElemType theObject);
49 //=============================================================================
51 //=============================================================================
53 GEOM_List_i<Type>::GEOM_List_i()
55 MESSAGE("GEOM_List_i::GEOM_List_i");
56 //create an empty list
60 //=============================================================================
62 //=============================================================================
64 GEOM_List_i<Type>::GEOM_List_i(const Type& theListToCopy)
66 int aLength = theListToCopy.length();
67 myGOList.length(aLength);
68 for (int i = 0; i < aLength; i++)
69 myGOList[i] = theListToCopy[i];
72 //=============================================================================
74 //=============================================================================
76 GEOM_List_i<Type>::~GEOM_List_i()
78 MESSAGE("GEOM_List_i::~GEOM_List_i");
81 //=============================================================================
83 //=============================================================================
85 const Type& GEOM_List_i<Type>::GetList()
87 MESSAGE("GEOM_List_i::GetList()");
91 //=============================================================================
93 //=============================================================================
95 template <class ElemType>
96 void GEOM_List_i<Type>::AddObject(ElemType theObject)
98 MESSAGE("GEOM_List_i::AddObject(...)");
99 int aLength = myGOList.length();
100 myGOList.length(aLength+1);
101 myGOList[aLength] = theObject;