SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
FileItem.h
1 //=========================================================================
2 // Copyright (c) Kitware, Inc.
3 // All rights reserved.
4 // See LICENSE.txt for details.
5 //
6 // This software is distributed WITHOUT ANY WARRANTY; without even
7 // the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
8 // PURPOSE. See the above copyright notice for more information.
9 //=========================================================================
10 // .NAME FileItem.h -
11 // .SECTION Description
12 // .SECTION See Also
13 
14 #ifndef smtk_attribute_FileItem_h
15 #define smtk_attribute_FileItem_h
16 
17 #include "smtk/CoreExports.h"
18 #include "smtk/PublicPointerDefs.h"
19 #include "smtk/attribute/FileSystemItem.h"
20 #include <string>
21 #include <vector>
22 
23 namespace smtk
24 {
25 namespace attribute
26 {
27 class FileItemDefinition;
28 class SMTKCORE_EXPORT FileItem : public FileSystemItem
29 {
30  friend class FileItemDefinition;
31 
32 public:
34  ~FileItem() override;
35 
36  Item::Type type() const override;
37 
38  const std::vector<std::string>& recentValues() const { return m_recentValues; }
39  void addRecentValue(const std::string& val);
40 
41 protected:
42  FileItem(Attribute* owningAttribute, int itemPosition);
43  FileItem(Item* owningItem, int position, int subGroupPosition);
44  bool setDefinition(smtk::attribute::ConstItemDefinitionPtr vdef) override;
45 
46  std::vector<std::string> m_recentValues;
47 
48 private:
49 };
50 
51 } // namespace attribute
52 } // namespace smtk
53 
54 #endif /* smtk_attribute_FileItem_h */
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::attribute::Item::Type
Type
Definition: Item.h:52
PublicPointerDefs.h
smtk::attribute::FileSystemItem
Definition: FileSystemItem.h:29
smtk::attribute::ConstItemDefinitionPtr
smtk::shared_ptr< const smtk::attribute::ItemDefinition > ConstItemDefinitionPtr
Definition: PublicPointerDefs.h:475
smtk::attribute::FileItemDefinition
Definition: FileItemDefinition.h:27
smtk::attribute::Item
Definition: Item.h:43
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:51
smtk::attribute::Attribute
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:49
smtk::attribute::FileItem
Definition: FileItem.h:28