SMTK  @SMTK_VERSION@
Simulation Modeling Tool Kit
IntItem.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 IntItem.h -
11 // .SECTION Description
12 // .SECTION See Also
13 
14 #ifndef smtk_attribute_IntItem_h
15 #define smtk_attribute_IntItem_h
16 
17 #include "smtk/CoreExports.h"
18 #include "smtk/attribute/ValueItemTemplate.h"
19 
20 namespace smtk
21 {
22 namespace attribute
23 {
24 class Attribute;
25 class IntItemDefinition;
26 class SMTKCORE_EXPORT IntItem : public ValueItemTemplate<int>
27 {
28  friend class IntItemDefinition;
29 
30 public:
32  ~IntItem() override;
33  Item::Type type() const override;
34 
35  using Item::assign;
36  // Assigns this item to be equivalent to another. Options are processed by derived item classes
37  // Returns true if success and false if a problem occurred. By default, an attribute being used by this
38  // to represent an expression will be copied if needed. Use IGNORE_EXPRESSIONS option to prevent this
39  // When an expression attribute is copied, its associations are by default not.
40  // Use COPY_NEW_ASSOCIATIONS if you want them copied as well.These options are defined in CopyAssigmentOptions.h .
41  bool assign(
42  const smtk::attribute::ConstItemPtr& sourceItem,
43  const CopyAssignmentOptions& options,
44  smtk::io::Logger& logger) override;
45 
46 protected:
47  IntItem(Attribute* owningAttribute, int itemPosition);
48  IntItem(Item* owningItem, int myPosition, int mySubGroupPosition);
49 
50 private:
51 };
52 } // namespace attribute
53 } // namespace smtk
54 
55 #endif /* smtk_attribute_IntItem_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
smtk::attribute::CopyAssignmentOptions
Class used to specify copy and assignment options.
Definition: CopyAssignmentOptions.h:211
smtk::attribute::IntItemDefinition
Definition: IntItemDefinition.h:23
smtk::attribute::ValueItemTemplate
Definition: ValueItemTemplate.h:33
smtk::attribute::Item::assign
virtual bool assign(const smtk::attribute::ConstItemPtr &sourceItem, unsigned int options)
Assigns this item to be equivalent to another.
Definition: Item.cxx:292
smtk::io::Logger
Log messages for later presentation to a user or a file.
Definition: Logger.h:95
smtk::attribute::IntItem
Definition: IntItem.h:26
smtk::attribute::Item
Definition: Item.h:43
smtkTypeMacro
#define smtkTypeMacro(...)
Add typedefs to a class for identifcation.
Definition: SharedFromThis.h:51
smtk::attribute::ConstItemPtr
smtk::shared_ptr< const smtk::attribute::Item > ConstItemPtr
Definition: PublicPointerDefs.h:469
smtk::attribute::Attribute
Represent a (possibly composite) value according to a definition.
Definition: Attribute.h:49