org.ogre4j
Class Profiler

java.lang.Object
  extended by org.xbig.base.NativeObject
      extended by org.ogre4j.Profiler
All Implemented Interfaces:
IAllocatedObject<IGeneralAllocPolicy>, IGeneralAllocatedObject, IProfiler, ISingleton<IProfiler>, INativeObject

public class Profiler
extends NativeObject
implements IProfiler


Nested Class Summary
protected static class Profiler.DisabledProfileMap
           
protected static class Profiler.ProfileBarList
           
protected static class Profiler.ProfileFrame
           
protected static class Profiler.ProfileFrameList
           
protected static class Profiler.ProfileHistory
           
protected static class Profiler.ProfileHistoryList
           
protected static class Profiler.ProfileHistoryMap
           
protected static class Profiler.ProfileInstance
           
protected static class Profiler.ProfileStack
           
 
Nested classes/interfaces inherited from interface org.ogre4j.IProfiler
IProfiler.IDisabledProfileMap, IProfiler.IProfileBarList, IProfiler.IProfileFrame, IProfiler.IProfileFrameList, IProfiler.IProfileHistory, IProfiler.IProfileHistoryList, IProfiler.IProfileHistoryMap, IProfiler.IProfileInstance, IProfiler.IProfileStack
 
Field Summary
 
Fields inherited from class org.xbig.base.NativeObject
deleted, object, remote
 
Constructor Summary
  Profiler()
           
  Profiler(InstancePointer p)
          This constructor is public for internal useage only!
protected Profiler(InstancePointer p, boolean remote)
          Creates a Java wrapper object for an existing C++ object.
  Profiler(WithoutNativeObject val)
          Allows creation of Java objects without C++ objects.
 
Method Summary
 void beginProfile(java.lang.String profileName)
          Begins a profile
 void delete()
          Deletes the corresponding C++ object.
 void disableProfile(java.lang.String profileName)
          Disables a profile
 void enableProfile(java.lang.String profileName)
          Enables a previously disabled profile
 void endProfile(java.lang.String profileName)
          Ends a profile
 void finalize()
           
 boolean getEnabled()
          Gets whether this profiler is enabled
static IProfiler getSingleton()
          Override standard retrieval.
static IProfiler getSingletonPtr()
          Override standard retrieval.
 ITimer getTimer()
          Retrieves the timer for the profiler
 long getUpdateDisplayFrequency()
          Gets the frequency that the display is updated
 void logResults()
          Outputs current profile statistics to the log
 void reset()
          Clears the profiler statistics
 void setEnabled(boolean enabled)
          Sets whether this profiler is enabled.
 void setTimer(ITimer t)
          Sets the timer for the profiler
 void setUpdateDisplayFrequency(long freq)
          Sets the so the display of results are updated ever n frames
 boolean watchForLimit(java.lang.String profileName, float limit, boolean greaterThan)
          Returns true if the specified profile goes over or under the given limit frame time
 boolean watchForMax(java.lang.String profileName)
          Returns true if the specified profile reaches a new frame time maximum
 boolean watchForMin(java.lang.String profileName)
          Returns true if the specified profile reaches a new frame time minimum
 
Methods inherited from class org.xbig.base.NativeObject
disconnectFromNativeObject, equals, getInstancePointer, hashCode, setInstancePointer, setInstancePointer, setInstancePointer, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.xbig.base.INativeObject
disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Constructor Detail

Profiler

public Profiler(InstancePointer p)
This constructor is public for internal useage only! Do not use it!


Profiler

protected Profiler(InstancePointer p,
                   boolean remote)
Creates a Java wrapper object for an existing C++ object. If remote is set to 'true' this object cannot be deleted in Java.


Profiler

public Profiler(WithoutNativeObject val)
Allows creation of Java objects without C++ objects.

See Also:
WithoutNativeObject, INativeObject.disconnectFromNativeObject()

Profiler

public Profiler()
Method Detail

delete

public void delete()
Description copied from interface: INativeObject
Deletes the corresponding C++ object.

Subclasses must implement this but if the native instance was created by the underlying library the native call to dispose must not happen!

Specified by:
delete in interface INativeObject
Specified by:
delete in class NativeObject
See Also:
#remote

finalize

public void finalize()
Overrides:
finalize in class NativeObject

setTimer

public void setTimer(ITimer t)
Sets the timer for the profiler

Specified by:
setTimer in interface IProfiler

getTimer

public ITimer getTimer()
Retrieves the timer for the profiler

Specified by:
getTimer in interface IProfiler

beginProfile

public void beginProfile(java.lang.String profileName)
Begins a profile

Specified by:
beginProfile in interface IProfiler

endProfile

public void endProfile(java.lang.String profileName)
Ends a profile

Specified by:
endProfile in interface IProfiler

setEnabled

public void setEnabled(boolean enabled)
Sets whether this profiler is enabled. Only takes effect after the the frame has ended.

Specified by:
setEnabled in interface IProfiler

getEnabled

public boolean getEnabled()
Gets whether this profiler is enabled

Specified by:
getEnabled in interface IProfiler

enableProfile

public void enableProfile(java.lang.String profileName)
Enables a previously disabled profile

Specified by:
enableProfile in interface IProfiler

disableProfile

public void disableProfile(java.lang.String profileName)
Disables a profile

Specified by:
disableProfile in interface IProfiler

watchForMax

public boolean watchForMax(java.lang.String profileName)
Returns true if the specified profile reaches a new frame time maximum

Specified by:
watchForMax in interface IProfiler

watchForMin

public boolean watchForMin(java.lang.String profileName)
Returns true if the specified profile reaches a new frame time minimum

Specified by:
watchForMin in interface IProfiler

watchForLimit

public boolean watchForLimit(java.lang.String profileName,
                             float limit,
                             boolean greaterThan)
Returns true if the specified profile goes over or under the given limit frame time

Specified by:
watchForLimit in interface IProfiler

logResults

public void logResults()
Outputs current profile statistics to the log

Specified by:
logResults in interface IProfiler

reset

public void reset()
Clears the profiler statistics

Specified by:
reset in interface IProfiler

setUpdateDisplayFrequency

public void setUpdateDisplayFrequency(long freq)
Sets the so the display of results are updated ever n frames

Specified by:
setUpdateDisplayFrequency in interface IProfiler

getUpdateDisplayFrequency

public long getUpdateDisplayFrequency()
Gets the frequency that the display is updated

Specified by:
getUpdateDisplayFrequency in interface IProfiler

getSingleton

public static IProfiler getSingleton()
Override standard retrieval.


getSingletonPtr

public static IProfiler getSingletonPtr()
Override standard retrieval.



Copyright © 2007 netAllied GmbH. All Rights Reserved.