HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_PerfMonEvent Class Reference

#include <UT_PerfMonEvent.h>

+ Inheritance diagram for UT_PerfMonEvent:

Public Member Functions

 UT_PerfMonEvent (int id, const UT_StringHolder &name, const UT_StringHolder &object, bool auto_nest_events, UT_PerfMonCategory category, UT_PerfMonEventType type, UT_PerfMonObjectType object_type, const UT_StringHolder &object_icon=UT_StringHolder::theEmptyString, const UT_StringHolder &extra_info=UT_StringHolder::theEmptyString, int frame_num=UT_PERFORMANCE_INVALID_FRAME)
 
virtual ~UT_PerfMonEvent ()
 
 UT_PerfMonEvent (const UT_PerfMonEvent &)=delete
 
UT_PerfMonEventoperator= (const UT_PerfMonEvent &)=delete
 
int id () const
 Return the unique id assigned by the performance monitor. More...
 
int frameNum () const
 Return the frame number in which the event occured. More...
 
const char * name () const
 Return the event name. More...
 
const char * object () const
 Return the object that the event applies to. More...
 
void setObject (const UT_StringHolder &object)
 Set the object that the event applies to. More...
 
const char * objectIcon () const
 
const char * extraInfo () const
 
void setExtraInfo (const UT_StringHolder &extra_info)
 
UT_PerfMonEventType type () const
 Return the event type. More...
 
UT_PerfMonObjectType objectType () const
 Return the event object type. More...
 
bool isAutoNestEnabled () const
 Return true if this event has automatic child event nesting enabled. More...
 
UT_PerfMonCategory category () const
 Return the category. More...
 
virtual bool isTimedEvent () const
 Return true if the event is a timed event. More...
 
void start ()
 
void stop ()
 
bool isRunning () const
 
fpreal value () const
 
fpreal selfValue () const
 
void setValue (fpreal val)
 Set the event value. More...
 
void overrideValue (fpreal value)
 
void calculateSelfValue ()
 
void appendChild (UT_PerfMonEvent *event)
 Add a child event. More...
 
void removeChild (UT_PerfMonEvent *event)
 
void removeChildren ()
 Remove all child events. More...
 
int numChildren () const
 Return the number of child events. More...
 
const UT_PerfMonEventgetChild (int index) const
 Return the child at the given index. More...
 
UT_PerfMonEventgetChild (int index)
 
void appendParent (UT_PerfMonEvent *event)
 Add a parent event. More...
 
void removeParent (UT_PerfMonEvent *event)
 
void removeParents ()
 Remove all parent events. More...
 
int numParents () const
 Return the number of parent events. More...
 
const UT_PerfMonEventgetParent (int index) const
 Return the parent at the given index. More...
 
UT_PerfMonEventgetParent (int index)
 
virtual void getFormattedString (UT_PerfMonLogTimeFormat time_format, UT_String &str_event) const
 Format the event into a pretty string that can be outputted in a log. More...
 
virtual void getUniversalLogEntry (UT_UniversalLogEntry &logentry) const
 Format the event for the universal logging system. More...
 

Protected Member Functions

bool isValueOverridden_ () const
 Return true if the value has been overridden. More...
 
virtual void subclassStart_ ()
 Perform work when the event is started. More...
 
virtual void subclassStop_ ()
 Perform work when the event is stopped. More...
 
virtual void subclassOverrideValue_ ()
 Perform work when the event's value has been overridden. More...
 
virtual fpreal subclassCalculateSelfValue_ ()
 
virtual void subclassCollectDataFromChild_ (const UT_PerfMonEvent *child)
 
void getFormattedObjectPathAndExtraInfo_ (bool enclose_obj_path_in_parens, UT_String &object_path, UT_String &extra_info) const
 Pass back a formatted string of this event's object path and extra info. More...
 

Detailed Description

Definition at line 30 of file UT_PerfMonEvent.h.

Constructor & Destructor Documentation

UT_PerfMonEvent::UT_PerfMonEvent ( int  id,
const UT_StringHolder name,
const UT_StringHolder object,
bool  auto_nest_events,
UT_PerfMonCategory  category,
UT_PerfMonEventType  type,
UT_PerfMonObjectType  object_type,
const UT_StringHolder object_icon = UT_StringHolder::theEmptyString,
const UT_StringHolder extra_info = UT_StringHolder::theEmptyString,
int  frame_num = UT_PERFORMANCE_INVALID_FRAME 
)
virtual UT_PerfMonEvent::~UT_PerfMonEvent ( )
virtual
UT_PerfMonEvent::UT_PerfMonEvent ( const UT_PerfMonEvent )
delete

Member Function Documentation

void UT_PerfMonEvent::appendChild ( UT_PerfMonEvent event)

Add a child event.

void UT_PerfMonEvent::appendParent ( UT_PerfMonEvent event)

Add a parent event.

void UT_PerfMonEvent::calculateSelfValue ( )

Calculate the event's self value. Do nothing if the event's main value has not been set. This can be an expensive call since the values of the event's descendants must be examined.

UT_PerfMonCategory UT_PerfMonEvent::category ( ) const

Return the category.

const char* UT_PerfMonEvent::extraInfo ( ) const

Return extra information about the event. Return NULL if there is no extra information.

int UT_PerfMonEvent::frameNum ( ) const

Return the frame number in which the event occured.

const UT_PerfMonEvent* UT_PerfMonEvent::getChild ( int  index) const

Return the child at the given index.

UT_PerfMonEvent* UT_PerfMonEvent::getChild ( int  index)
void UT_PerfMonEvent::getFormattedObjectPathAndExtraInfo_ ( bool  enclose_obj_path_in_parens,
UT_String object_path,
UT_String extra_info 
) const
protected

Pass back a formatted string of this event's object path and extra info.

virtual void UT_PerfMonEvent::getFormattedString ( UT_PerfMonLogTimeFormat  time_format,
UT_String str_event 
) const
virtual

Format the event into a pretty string that can be outputted in a log.

Reimplemented in UT_PerfMonTimedEvent, and UT_PerfMonMemoryEvent.

const UT_PerfMonEvent* UT_PerfMonEvent::getParent ( int  index) const

Return the parent at the given index.

UT_PerfMonEvent* UT_PerfMonEvent::getParent ( int  index)
virtual void UT_PerfMonEvent::getUniversalLogEntry ( UT_UniversalLogEntry logentry) const
virtual

Format the event for the universal logging system.

int UT_PerfMonEvent::id ( ) const

Return the unique id assigned by the performance monitor.

bool UT_PerfMonEvent::isAutoNestEnabled ( ) const

Return true if this event has automatic child event nesting enabled.

bool UT_PerfMonEvent::isRunning ( ) const

Return true if the event is in the running state. Return false otherwise.

virtual bool UT_PerfMonEvent::isTimedEvent ( ) const
inlinevirtual

Return true if the event is a timed event.

Reimplemented in UT_PerfMonTimedEvent.

Definition at line 90 of file UT_PerfMonEvent.h.

bool UT_PerfMonEvent::isValueOverridden_ ( ) const
protected

Return true if the value has been overridden.

const char* UT_PerfMonEvent::name ( ) const

Return the event name.

int UT_PerfMonEvent::numChildren ( ) const

Return the number of child events.

int UT_PerfMonEvent::numParents ( ) const

Return the number of parent events.

const char* UT_PerfMonEvent::object ( ) const

Return the object that the event applies to.

const char* UT_PerfMonEvent::objectIcon ( ) const

Return the icon used for the object. Return NULL if the object has no associated icon.

UT_PerfMonObjectType UT_PerfMonEvent::objectType ( ) const

Return the event object type.

UT_PerfMonEvent& UT_PerfMonEvent::operator= ( const UT_PerfMonEvent )
delete
void UT_PerfMonEvent::overrideValue ( fpreal  value)

Override the event's value. Handy when you know the event's value and not its starting or stopping values.

void UT_PerfMonEvent::removeChild ( UT_PerfMonEvent event)

Remove the given child event. Do nothing if the given event is not actually a child of this event.

void UT_PerfMonEvent::removeChildren ( )

Remove all child events.

void UT_PerfMonEvent::removeParent ( UT_PerfMonEvent event)

Remove the given parent event. Do nothing if the given event is not actually a parent of this event.

void UT_PerfMonEvent::removeParents ( )

Remove all parent events.

fpreal UT_PerfMonEvent::selfValue ( ) const

Return the event value minus the value of any of the descendant events. If no self value has been calculated, then return 0.

void UT_PerfMonEvent::setExtraInfo ( const UT_StringHolder extra_info)

Set extra information that will be displayed with the event in profile statistics and in the event log.

void UT_PerfMonEvent::setObject ( const UT_StringHolder object)

Set the object that the event applies to.

void UT_PerfMonEvent::setValue ( fpreal  val)

Set the event value.

void UT_PerfMonEvent::start ( )

Start the event. This puts the event in a running state. Real work is performed in subclassStart_().

void UT_PerfMonEvent::stop ( )

Stop the event. This removes the event from a running state. Real work is performed in subclassStop_().

virtual fpreal UT_PerfMonEvent::subclassCalculateSelfValue_ ( )
protectedvirtual

Perform work to calculate the event's self value. Return the calculated self value.

Reimplemented in UT_PerfMonTimedEvent, and UT_PerfMonMemoryEvent.

virtual void UT_PerfMonEvent::subclassCollectDataFromChild_ ( const UT_PerfMonEvent child)
protectedvirtual

Collect the data from the given child event and merge it into this event's children data.

Reimplemented in UT_PerfMonTimedEvent, and UT_PerfMonMemoryEvent.

virtual void UT_PerfMonEvent::subclassOverrideValue_ ( )
protectedvirtual

Perform work when the event's value has been overridden.

Reimplemented in UT_PerfMonTimedEvent.

virtual void UT_PerfMonEvent::subclassStart_ ( )
protectedvirtual

Perform work when the event is started.

Reimplemented in UT_PerfMonTimedEvent, and UT_PerfMonMemoryEvent.

virtual void UT_PerfMonEvent::subclassStop_ ( )
protectedvirtual

Perform work when the event is stopped.

Reimplemented in UT_PerfMonTimedEvent, and UT_PerfMonMemoryEvent.

UT_PerfMonEventType UT_PerfMonEvent::type ( ) const

Return the event type.

fpreal UT_PerfMonEvent::value ( ) const

Return the event value. If no value has been set, then return 0.


The documentation for this class was generated from the following file: