Ocean
SDXDynamicNode.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_SCENEDESCRIPTION_SDX_DYNAMIC_NODE_H
9 #define META_OCEAN_SCENEDESCRIPTION_SDX_DYNAMIC_NODE_H
10 
14 
15 namespace Ocean
16 {
17 
18 namespace SceneDescription
19 {
20 
21 // Forward declaration.
22 class SDXDynamicNode;
23 
24 /**
25  * Definition of a smart object reference for SDX dynamic scene description nodes.
26  * @see SDXDynamicNode, Node.
27  * @ingroup scenedescription
28  */
30 
31 /**
32  * This class implements the base class for all dynamic SDX scene description nodes.
33  * @ingroup scenedescription
34  */
35 class OCEAN_SCENEDESCRIPTION_EXPORT SDXDynamicNode :
36  virtual public DynamicNode,
37  virtual public SDXNode
38 {
39  public:
40 
41  /**
42  * Sets or changes a specified standard or dynamic field of this node.
43  * @param fieldName Name of the field to set
44  * @param field Field to replace the current field
45  * @return True, if succeeded
46  */
47  bool setAnyField(const std::string& fieldName, const Field& field) override;
48 
49  /**
50  * Sets or changes a specified dynamic field of this node.
51  * @param fieldName Name of the field to set
52  * @param field Field to replace the current field
53  * @return True, if succeeded
54  */
55  virtual bool setDynamicField(const std::string& fieldName, const Field& field);
56 
57  protected:
58 
59  /**
60  * Creates a new dynamic SDX node object.
61  * @param environment Node environment
62  */
63  explicit SDXDynamicNode(const SDXEnvironment* environment);
64 
65  /**
66  * Destructs a dynamic SDX node object.
67  */
68  ~SDXDynamicNode() override;
69 };
70 
71 }
72 
73 }
74 
75 #endif // META_OCEAN_SCENEDESCRIPTION_SDX_DYNAMIC_NODE_H
This class is the base class for all nodes able to handle fields loaded during runtime.
Definition: DynamicNode.h:37
This class is the base class for all scene description fields.
Definition: Field.h:36
This class implements the base class for all dynamic SDX scene description nodes.
Definition: SDXDynamicNode.h:38
SDXDynamicNode(const SDXEnvironment *environment)
Creates a new dynamic SDX node object.
bool setAnyField(const std::string &fieldName, const Field &field) override
Sets or changes a specified standard or dynamic field of this node.
virtual bool setDynamicField(const std::string &fieldName, const Field &field)
Sets or changes a specified dynamic field of this node.
~SDXDynamicNode() override
Destructs a dynamic SDX node object.
This class implements a node environment container.
Definition: SDXNode.h:62
This class implements the base class for all SDX scene description nodes.
Definition: SDXNode.h:50
This template class implements a smart object reference which is a specialization of an ObjectRef obj...
Definition: SmartObjectRef.h:90
SmartObjectRef< SDXDynamicNode, Node > SDXDynamicNodeRef
Definition of a smart object reference for SDX dynamic scene description nodes.
Definition: SDXDynamicNode.h:22
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15