ufe  4.2
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
nodeDef.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ECP/ufe/ufe-full-python3.10-windows/ufe/include/nodeDef.h"
2 #ifndef _ufeNodeDef
3 #define _ufeNodeDef
4 // =======================================================================
5 // Copyright 2022 Autodesk, Inc. All rights reserved.
6 //
7 // This computer source code and related instructions and comments are the
8 // unpublished confidential and proprietary information of Autodesk, Inc.
9 // and are protected under applicable copyright and trade secret law. They
10 // may not be disclosed to, copied or used by any third party without the
11 // prior written consent of Autodesk, Inc.
12 // =======================================================================
13 
14 #include "common/ufeExport.h"
15 #include "attributeDef.h"
16 #include "rtid.h"
17 #include "sceneItem.h"
18 #include "undoableCommand.h"
19 #include "value.h"
20 
21 #include <memory>
22 #include <string>
23 #include <vector>
24 
25 UFE_NS_DEF {
26 
27 typedef std::vector<AttributeDef::ConstPtr> ConstAttributeDefs;
28 
38 {
39 public:
40  typedef std::shared_ptr<NodeDef> Ptr;
41 
43  virtual ~NodeDef();
44 
46  virtual std::string type() const = 0;
47 
55  virtual std::size_t nbClassifications() const = 0;
56 
64  virtual std::string classification(std::size_t level) const = 0;
65 
67  virtual std::vector<std::string> inputNames() const = 0;
68 
74  virtual bool hasInput(const std::string& name) const = 0;
75 
82  virtual AttributeDef::ConstPtr input(const std::string& name) const = 0;
83 
85  virtual ConstAttributeDefs inputs() const = 0;
86 
88  virtual std::vector<std::string> outputNames() const = 0;
89 
95  virtual bool hasOutput(const std::string& name) const = 0;
96 
103  virtual AttributeDef::ConstPtr output(const std::string& name) const = 0;
104 
106  virtual ConstAttributeDefs outputs() const = 0;
107 
109  static Ptr definition(const Rtid& id, const std::string& type);
110 
116  virtual Value getMetadata(const std::string& key) const = 0;
117 
119  virtual bool hasMetadata(const std::string& key) const = 0;
120 
126  virtual SceneItem::Ptr createNode(
127  const SceneItem::Ptr& parent, const PathComponent& name) const = 0;
128 
134  virtual InsertChildCommand::Ptr createNodeCmd(
135  const SceneItem::Ptr& parent, const PathComponent& name) const = 0;
136 
137 protected:
139  NodeDef();
140 }; // end class
141 
142 typedef std::vector<NodeDef::Ptr> NodeDefs;
143 
144 } // end namespace
145 
146 #endif /* _ufeNodeDef */
std::string string(const Path &path)
Definition of macros for symbol visibility.
Constant string representation with fixed space and O(1) comparison.
Definition: pathComponent.h:33
std::vector< AttributeDef::ConstPtr > ConstAttributeDefs
Definition: nodeDef.h:27
uint32_t Rtid
Definition: rtid.h:26
std::shared_ptr< const AttributeDef > ConstPtr
Definition: attributeDef.h:33
Value class that can hold a wide set of types.
Definition: value.h:34
#define UFE_NS_DEF
Definition: ufe.h:35
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:40
std::shared_ptr< NodeDef > Ptr
Definition: nodeDef.h:40
Abstract base class for NodeDef interface.
Definition: nodeDef.h:37
std::vector< NodeDef::Ptr > NodeDefs
Definition: nodeDef.h:142
#define UFE_SDK_DECL
Definition: ufeExport.h:36
std::shared_ptr< InsertChildCommand > Ptr