SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
FileItemDefinition.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 FileItemDefinition.h -
11 // .SECTION Description
12 // .SECTION See Also
13 
14 #ifndef smtk_attribute_FileItemDefinition_h
15 #define smtk_attribute_FileItemDefinition_h
16 
17 #include "smtk/CoreExports.h"
18 #include "smtk/PublicPointerDefs.h"
19 
20 #include "smtk/attribute/FileSystemItemDefinition.h"
21 
22 namespace smtk
23 {
24 namespace attribute
25 {
26 class Attribute;
27 class SMTKCORE_EXPORT FileItemDefinition : public FileSystemItemDefinition
28 {
29 public:
31  static smtk::attribute::FileItemDefinitionPtr New(const std::string& myName)
32  {
34  }
35 
36  ~FileItemDefinition() override;
37 
38  Item::Type type() const override;
39  bool isValueValid(const std::string& val) const override;
42  int filterId(const std::string& val) const;
43 
44  smtk::attribute::ItemPtr buildItem(Attribute* owningAttribute, int itemPosition) const override;
45  smtk::attribute::ItemPtr buildItem(Item* owningItem, int position, int subGroupPosition)
46  const override;
47 
49  const std::string& getFileFilters() const { return m_fileFilters; }
52  void setFileFilters(const std::string& filters) { m_fileFilters = filters; }
54 
56  std::string getSummarizedFileFilters() const;
67 
69  static std::string aggregateFileFilters(const std::string&);
76  static std::string aggregateFileFilters(const std::string&, int&);
78 
80  smtk::attribute::ItemDefinition::CopyInfo& info) const override;
81 
82 protected:
83  FileItemDefinition(const std::string& myName);
84 
85  std::string m_fileFilters;
86 
87 private:
88 };
89 } // namespace attribute
90 } // namespace smtk
91 
92 #endif /* smtk_attribute_FileItemDefinition_h */
smtk
The main namespace for the Simulation Modeling Tool Kit (SMTK).
Definition: doc.h:33
smtk::attribute::Item::Type
Type
Definition: Item.h:53
PublicPointerDefs.h
smtk::attribute::FileItemDefinitionPtr
smtk::shared_ptr< smtk::attribute::FileItemDefinition > FileItemDefinitionPtr
Definition: PublicPointerDefs.h:501
smtk::attribute::FileItemDefinition
Definition: FileItemDefinition.h:27
smtk::attribute::ItemDefinition::CopyInfo
Definition: ItemDefinition.h:47
smtk::attribute::Item
Definition: Item.h:44
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::ItemPtr
smtk::shared_ptr< smtk::attribute::Item > ItemPtr
Definition: PublicPointerDefs.h:467
smtk::attribute::FileSystemItemDefinition
Definition: FileSystemItemDefinition.h:27
smtk::attribute::ItemDefinitionPtr
smtk::shared_ptr< smtk::attribute::ItemDefinition > ItemDefinitionPtr
Definition: PublicPointerDefs.h:473