All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AdvancedDatastoreDescriptor.hpp
Go to the documentation of this file.
1 /*
2 
3  This file is part of OpenFLUID software
4  Copyright(c) 2007, INRA - Montpellier SupAgro
5 
6 
7  == GNU General Public License Usage ==
8 
9  OpenFLUID is free software: you can redistribute it and/or modify
10  it under the terms of the GNU General Public License as published by
11  the Free Software Foundation, either version 3 of the License, or
12  (at your option) any later version.
13 
14  OpenFLUID is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU General Public License for more details.
18 
19  You should have received a copy of the GNU General Public License
20  along with OpenFLUID. If not, see <http://www.gnu.org/licenses/>.
21 
22 
23  == Other Usage ==
24 
25  Other Usage means a use of OpenFLUID that is inconsistent with the GPL
26  license, and requires a written agreement between You and INRA.
27  Licensees for Other Usage of OpenFLUID may use this file in accordance
28  with the terms contained in the written agreement between You and INRA.
29 
30 */
31 
32 /**
33  \file AdvancedDatastoreDescriptor.hpp
34  \brief Header of ...
35 
36  \author Aline LIBRES <aline.libres@gmail.com>
37  */
38 
39 #ifndef __ADVANCEDDATASTOREDESCRIPTOR_HPP__
40 #define __ADVANCEDDATASTOREDESCRIPTOR_HPP__
41 
42 #include <list>
43 #include <string>
44 #include <openfluid/dllexport.hpp>
45 
47 
48 
49 namespace openfluid { namespace fluidx {
50 
53 
55 {
56  private:
57 
59 
60  public:
61 
64 
66 
67  const std::list<openfluid::fluidx::DatastoreItemDescriptor*>& getItems() const;
68 
69  std::list<openfluid::fluidx::DatastoreItemDescriptor*> getItems(const std::string& UnitClass) const;
70 
71  std::list<openfluid::fluidx::DatastoreItemDescriptor*> getItems(const std::string& UnitClass,
73 
74  /**
75  * Move the Item located at the given From position to the To position (positions starts at index 0)
76  * @param From
77  * @param To
78  * @throw openfluid::base::OFException a position is out of range
79  */
80  void moveItem(unsigned int From, unsigned int To);
81 
82  void appendItem(openfluid::fluidx::DatastoreItemDescriptor* Item);
83 
84  /**
85  Insert an Item before the given position (positions starts at index 0)
86  @param[in] Item the DatastoreItemDescriptor to insert
87  @param[in] Position the position, should be between zero and list size - 1.
88  To insert an Item at the end of the list, use appendItem instead.
89  @throw openfluid::base::OFException if Position is out of range
90  */
91  void insertItem(openfluid::fluidx::DatastoreItemDescriptor* Item,
92  unsigned int Position);
93 
94  /**
95  Remove from the list the Item located at the given Position (positions starts at index 0).
96  This doesn't delete the DatastoreItemDescriptor pointer.
97  @param[in] Position the position
98  @throw openfluid::base::OFException if Position is out of range
99  */
100  void removeItem(unsigned int Position);
101 
102  std::list<std::string> getItemsIDs() const;
103 
104  bool isItemAlreadyExist(std::string ItemID) const;
105 
106  /**
107  * @brief Gets the item of the datastore matching the given ID.
108  *
109  * @param ItemID ID of the expected item.
110  * @return The item with the given ID, or 0 if not found.
111  */
112  openfluid::fluidx::DatastoreItemDescriptor* getItem(const std::string& ItemID);
113 
114 
115 
116 };
117 
118 } } // namespaces
119 
120 #endif /* __ADVANCEDDATASTOREDESCRIPTOR_HPP__ */
Definition: AdvancedDatastoreDescriptor.hpp:54
Definition: DatastoreDescriptor.hpp:51
Header of ...
Definition: DatastoreItemDescriptor.hpp:52
UnstructuredType
Definition: UnstructuredValue.hpp:53
#define DLLEXPORT
Definition: dllexport.hpp:51