HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
MOT_Performance.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: MOT_Performance.h ( MOT Library, C++)
7  *
8  * COMMENTS:
9  *
10  * The performance monitor.
11  */
12 
13 #ifndef __MOT_Performance__
14 #define __MOT_Performance__
15 
16 #include "MOT_API.h"
17 
18 #include <NET/NET_Performance.h>
19 
20 class OP_Node;
21 class UT_PerfMonStats;
22 
24 {
25 public:
27  ~MOT_Performance() override;
28 
29  /// Return the icon name to use for the given stats object.
30  /// Return NULL if there is no known icon to use for the object.
31  /// Subclasses can override this method to set up their own mappings
32  /// of stats objects to icons.
33  const char *getStatsIcon(const UT_PerfMonStats *stats) const override;
34 
35  /// Returns true if the particular node passed is allowed to
36  /// participate in recording of the statistics, false otherwise.
37  /// This is currently used for disallowing recording of the contents
38  /// of compiled nodes.
39  bool isRecordingAllowedFor(OP_Node* node) const override;
40 
41 protected:
42 
43  /// Return the current frame.
44  int getCurrentFrameSubclass_() override;
45 
46  /// Return a pointer to the node specified by the given id.
47  OP_Node *getNodeSubclass_(int node_id) const override;
48 
49  /// Return a pointer to the node that is bound to the given SIM solver.
51  const SIM_Solver *solver) const override;
52 
53  /// Pass back an object path that can be tied to a UT_PerfMonStats object.
54  /// The path is generated from the given node and event name.
56  OP_Node *node,
57  const char *event_name,
58  UT_WorkBuffer &object_path) const override;
59 
60  /// Pass back an object path that can be tied to a UT_PerfMonStats object.
61  /// The path is generated from the given solver, node and event name.
63  const SIM_Solver *solver, OP_Node *node,
64  const char *event_name, UT_WorkBuffer &object_path)
65  const override;
66 
67  /// Pass back extra info that can be tied to a UT_PerfMonStats object.
68  /// The extra info is generated from the given node.
70  OP_Node *node,
71  UT_WorkBuffer &extra_info) const override;
72 
73  /// Start the remote listener
74  void startRemoteListener_() override;
75 };
76 
77 #endif
78 
virtual OP_Node * getNodeFromSolverSubclass_(const SIM_Solver *solver) const
Return a pointer to the node that is bound to the given SIM solver.
virtual void startRemoteListener_()
Start the remote listener to handle incoming information.
virtual void getObjectPathFromNodeSubclass_(OP_Node *node, const char *event_name, UT_WorkBuffer &object_path) const
virtual bool isRecordingAllowedFor(OP_Node *node) const
#define MOT_API
Definition: MOT_API.h:10
A collection of statistics for a particular object (i.e. node, viewport).
virtual int getCurrentFrameSubclass_()
Return the current frame.
virtual void getObjectPathFromSolverAndNodeSubclass_(const SIM_Solver *solver, OP_Node *node, const char *event_name, UT_WorkBuffer &object_path) const
virtual const char * getStatsIcon(const UT_PerfMonStats *stats) const
virtual void getExtraInfoFromNodeSubclass_(OP_Node *node, UT_WorkBuffer &extra_info) const
virtual OP_Node * getNodeSubclass_(int node_id) const
Return a pointer to the node specified by the given id.