Ocean
JSSceneDescriptionNode.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_INTERACTION_JS_SCENE_DESCRIPTION_NODE_H
9 #define META_OCEAN_INTERACTION_JS_SCENE_DESCRIPTION_NODE_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace Interaction
18 {
19 
20 namespace JavaScript
21 {
22 
23 /**
24  * This class implements a wrapper for a JavaScript SceneDescriptionNode object.
25  * @ingroup interactionjs
26  */
27 class OCEAN_INTERACTION_JS_EXPORT JSSceneDescriptionNode : public JSObject<JSSceneDescriptionNode, SceneDescription::NodeRef>
28 {
29  friend class JSObject<JSSceneDescriptionNode, SceneDescription::NodeRef>;
30  friend class JSLibrary;
31 
32  public:
33 
34  /**
35  * Definition of ids for individual accessors.
36  */
37  enum AccessorId : unsigned int
38  {
39  /// The accessor for the name property, a string value.
41  /// The accessor for the type property, a string value.
42  AI_TYPE
43  };
44 
45  /**
46  * Definition of ids for individual functions.
47  */
48  enum FunctionId : unsigned int
49  {
52 
56 
59 
61  FI_PARENTS
62  };
63 
64  public:
65 
66  /**
67  * Returns the JavaScript name of this object.
68  * @return The object's JavaScript name
69  */
70  static inline const char* objectName();
71 
72  protected:
73 
74  /**
75  * Creates the function template and object template for this object.
76  */
77  static void createFunctionTemplate();
78 };
79 
81 {
82  return "SceneDescriptionNode";
83 }
84 
85 }
86 
87 }
88 
89 }
90 
91 #endif // META_OCEAN_INTERACTION_JS_SCENE_DESCRIPTION_NODE_H
This class implements the java script interaction library object.
Definition: JSLibrary.h:32
This class implements the base class for all native wrapper of JavaScript objects.
Definition: JSObject.h:31
This class implements a wrapper for a JavaScript SceneDescriptionNode object.
Definition: JSSceneDescriptionNode.h:28
AccessorId
Definition of ids for individual accessors.
Definition: JSSceneDescriptionNode.h:38
@ AI_NAME
The accessor for the name property, a string value.
Definition: JSSceneDescriptionNode.h:40
FunctionId
Definition of ids for individual functions.
Definition: JSSceneDescriptionNode.h:49
@ FI_IS_INVALID
Definition: JSSceneDescriptionNode.h:58
@ FI_FIELD_DIMENSION
Definition: JSSceneDescriptionNode.h:55
@ FI_IS_VALID
Definition: JSSceneDescriptionNode.h:57
@ FI_FIELD_TYPE
Definition: JSSceneDescriptionNode.h:54
@ FI_HAS_FIELD
Definition: JSSceneDescriptionNode.h:53
@ FI_PARENT
Definition: JSSceneDescriptionNode.h:60
@ FI_FIELD
Definition: JSSceneDescriptionNode.h:50
@ FI_SET_FIELD
Definition: JSSceneDescriptionNode.h:51
static const char * objectName()
Returns the JavaScript name of this object.
Definition: JSSceneDescriptionNode.h:80
static void createFunctionTemplate()
Creates the function template and object template for this object.
SmartObjectRef< Node > NodeRef
Definition of a smart object reference holding a node.
Definition: rendering/Node.h:27
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15