HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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 <UT/UT_Performance.h>
19 
20 class OP_Node;
21 class UT_PerfMonStats;
22 
24 {
25 public:
27  virtual ~MOT_Performance();
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  virtual const char *getStatsIcon(const UT_PerfMonStats *stats) const;
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  virtual bool isRecordingAllowedFor(OP_Node* node) const;
40 
41 protected:
42 
43  /// Return the current frame.
44  virtual int getCurrentFrameSubclass_();
45 
46  /// Return a pointer to the node specified by the given id.
47  virtual OP_Node *getNodeSubclass_(int node_id) const;
48 
49  /// Return a pointer to the node that is bound to the given SIM solver.
51  const SIM_Solver *solver) const;
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.
55  virtual void getObjectPathFromNodeSubclass_(
56  OP_Node *node, const char *event_name,
57  UT_WorkBuffer &object_path) const;
58 
59  /// Pass back an object path that can be tied to a UT_PerfMonStats object.
60  /// The path is generated from the given solver, node and event name.
62  const SIM_Solver *solver, OP_Node *node,
63  const char *event_name, UT_WorkBuffer &object_path)
64  const;
65 
66  /// Pass back extra info that can be tied to a UT_PerfMonStats object.
67  /// The extra info is generated from the given node.
68  virtual void getExtraInfoFromNodeSubclass_(
69  OP_Node *node, UT_WorkBuffer &extra_info) const;
70 
71 };
72 
73 #endif
74 
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 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.