Dali 3D User Interface Engine
List of all members | Public Member Functions | Private Attributes
Dali::TraceCallStack Class Reference

Helper class to track method calls in the abstraction and search for them in test cases. More...

#include <test-trace-call-stack.h>

Collaboration diagram for Dali::TraceCallStack:
Collaboration graph
[legend]

Public Member Functions

 TraceCallStack ()
 Constructor. More...
 
 ~TraceCallStack ()
 Destructor. More...
 
void Enable (bool enable)
 Turn on / off tracing. More...
 
bool IsEnabled ()
 
void PushCall (std::string method, std::string params)
 Push a call onto the stack if the trace is active. More...
 
bool FindMethod (std::string method) const
 Search for a method in the stack. More...
 
int CountMethod (std::string method) const
 Count how many times a method was called. More...
 
bool FindMethodAndParams (std::string method, std::string params) const
 Search for a method in the stack with the given parameter list. More...
 
int FindIndexFromMethodAndParams (std::string method, std::string params) const
 Search for a method in the stack with the given parameter list. More...
 
bool TestMethodAndParams (int index, std::string method, std::string params) const
 Test if the given method and parameters are at a given index in the stack. More...
 
void Reset ()
 Reset the call stack. More...
 
const std::vector< std::vector
< std::string > > & 
GetCallStack ()
 Get the call stack. More...
 
 TraceCallStack ()
 Constructor. More...
 
 ~TraceCallStack ()
 Destructor. More...
 
void Enable (bool enable)
 Turn on / off tracing. More...
 
bool IsEnabled ()
 
void PushCall (std::string method, std::string params)
 Push a call onto the stack if the trace is active. More...
 
bool FindMethod (std::string method) const
 Search for a method in the stack. More...
 
int CountMethod (std::string method) const
 Count how many times a method was called. More...
 
bool FindMethodAndParams (std::string method, std::string params) const
 Search for a method in the stack with the given parameter list. More...
 
int FindIndexFromMethodAndParams (std::string method, std::string params) const
 Search for a method in the stack with the given parameter list. More...
 
bool TestMethodAndParams (int index, std::string method, std::string params) const
 Test if the given method and parameters are at a given index in the stack. More...
 
void Reset ()
 Reset the call stack. More...
 
const std::vector< std::vector
< std::string > > & 
GetCallStack ()
 Get the call stack. More...
 
 TraceCallStack ()
 Constructor. More...
 
 ~TraceCallStack ()
 Destructor. More...
 
void Enable (bool enable)
 Turn on / off tracing. More...
 
bool IsEnabled ()
 
void PushCall (std::string method, std::string params)
 Push a call onto the stack if the trace is active. More...
 
bool FindMethod (std::string method) const
 Search for a method in the stack. More...
 
int CountMethod (std::string method) const
 Count how many times a method was called. More...
 
bool FindMethodAndParams (std::string method, std::string params) const
 Search for a method in the stack with the given parameter list. More...
 
int FindIndexFromMethodAndParams (std::string method, std::string params) const
 Search for a method in the stack with the given parameter list. More...
 
bool TestMethodAndParams (int index, std::string method, std::string params) const
 Test if the given method and parameters are at a given index in the stack. More...
 
void Reset ()
 Reset the call stack. More...
 
const std::vector< std::vector
< std::string > > & 
GetCallStack ()
 Get the call stack. More...
 

Private Attributes

bool mTraceActive
 True if the trace is active. More...
 
std::vector< std::vector
< std::string > > 
mCallStack
 The call stack. More...
 

Detailed Description

Helper class to track method calls in the abstraction and search for them in test cases.

Definition at line 30 of file test-trace-call-stack.h.

Constructor & Destructor Documentation

Dali::TraceCallStack::TraceCallStack ( )

Constructor.

Definition at line 25 of file test-trace-call-stack.cpp.

Dali::TraceCallStack::~TraceCallStack ( )

Destructor.

Definition at line 30 of file test-trace-call-stack.cpp.

Dali::TraceCallStack::TraceCallStack ( )

Constructor.

Dali::TraceCallStack::~TraceCallStack ( )

Destructor.

Dali::TraceCallStack::TraceCallStack ( )

Constructor.

Dali::TraceCallStack::~TraceCallStack ( )

Destructor.

Member Function Documentation

int Dali::TraceCallStack::CountMethod ( std::string  method) const

Count how many times a method was called.

Parameters
[in]methodThe name of the method
Returns
The number of times it was called

Definition at line 74 of file test-trace-call-stack.cpp.

References mCallStack.

Referenced by UtcDaliGeometrySetGetGeometryType01(), UtcDaliGeometrySetGetGeometryType02(), UtcDaliImageActorSetFilterMode(), UtcDaliMaterialAddTexture01(), UtcDaliMaterialAddTexture02(), UtcDaliMaterialSetSampler(), UtcDaliRendererSetGetFaceCullingMode(), UtcDaliRenderTaskOnce08(), UtcDaliRenderTaskSetExclusive02(), UtcSamplerSetFilterMode(), and UtcSamplerSetWrapMode().

Here is the caller graph for this function:

int Dali::TraceCallStack::CountMethod ( std::string  method) const

Count how many times a method was called.

Parameters
[in]methodThe name of the method
Returns
The number of times it was called
int Dali::TraceCallStack::CountMethod ( std::string  method) const

Count how many times a method was called.

Parameters
[in]methodThe name of the method
Returns
The number of times it was called
void Dali::TraceCallStack::Enable ( bool  enable)

Turn on / off tracing.

Definition at line 35 of file test-trace-call-stack.cpp.

References mTraceActive.

Referenced by Dali::TestGlSyncAbstraction::EnableTrace(), Dali::TestPlatformAbstraction::Initialize(), UtcDaliAtlasClear(), UtcDaliGeometrySetGetGeometryType01(), UtcDaliGeometrySetGetGeometryType02(), UtcDaliImageActorNinePatch01(), UtcDaliImageActorNinePatch02(), UtcDaliImageActorNinePatch03(), UtcDaliImageActorNinePatch04(), UtcDaliImageActorSetFilterMode(), UtcDaliImageAtlasImageView(), UtcDaliImageAtlasUploadP(), UtcDaliImageContextLoss(), UtcDaliMaterialAddTexture01(), UtcDaliMaterialAddTexture02(), UtcDaliMaterialSetSampler(), UtcDaliRenderTaskContinous05(), UtcDaliRenderTaskContinuous01(), UtcDaliRenderTaskContinuous02(), UtcDaliRenderTaskContinuous03(), UtcDaliRenderTaskContinuous04(), UtcDaliRenderTaskOnce01(), UtcDaliRenderTaskOnce02(), UtcDaliRenderTaskOnce03(), UtcDaliRenderTaskOnce04(), UtcDaliRenderTaskOnce05(), UtcDaliRenderTaskOnce07(), UtcDaliRenderTaskOnce08(), UtcDaliRenderTaskOnce09(), UtcDaliRenderTaskOnce10(), UtcDaliRenderTaskOnceChain01(), UtcDaliRenderTaskOnceNoSync01(), UtcDaliRenderTaskOnceNoSync02(), UtcDaliRenderTaskOnceNoSync03(), UtcDaliRenderTaskOnceNoSync04(), UtcDaliRenderTaskOnceNoSync05(), UtcDaliRenderTaskOnceNoSync07(), UtcDaliRenderTaskOnceNoSync08(), UtcDaliRenderTaskOnceNoSync09(), UtcDaliRenderTaskOnceNoSync10(), UtcDaliRenderTaskSetExclusive02(), UtcFrustumBottomCullN(), UtcFrustumBottomCullP(), UtcFrustumCullDisabledP(), UtcFrustumCullN(), UtcFrustumFarCullN(), UtcFrustumFarCullP(), UtcFrustumLeftCullN(), UtcFrustumLeftCullP(), UtcFrustumNearCullN(), UtcFrustumNearCullP(), UtcFrustumRightCullN(), UtcFrustumRightCullP(), UtcFrustumTopCullN(), UtcFrustumTopCullP(), UtcSamplerSetFilterMode(), and UtcSamplerSetWrapMode().

void Dali::TraceCallStack::Enable ( bool  enable)

Turn on / off tracing.

void Dali::TraceCallStack::Enable ( bool  enable)

Turn on / off tracing.

int Dali::TraceCallStack::FindIndexFromMethodAndParams ( std::string  method,
std::string  params 
) const

Search for a method in the stack with the given parameter list.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
Returns
index in the stack where the method was found or -1 otherwise
int Dali::TraceCallStack::FindIndexFromMethodAndParams ( std::string  method,
std::string  params 
) const

Search for a method in the stack with the given parameter list.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
Returns
index in the stack where the method was found or -1 otherwise
int Dali::TraceCallStack::FindIndexFromMethodAndParams ( std::string  method,
std::string  params 
) const

Search for a method in the stack with the given parameter list.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
Returns
index in the stack where the method was found or -1 otherwise

Definition at line 104 of file test-trace-call-stack.cpp.

References mCallStack.

Referenced by FindMethodAndParams(), UtcDaliRendererRenderOrder2DLayer(), UtcDaliRendererRenderOrder2DLayerMultipleRenderers(), and UtcDaliRendererRenderOrder2DLayerOverlay().

Here is the caller graph for this function:

bool Dali::TraceCallStack::FindMethod ( std::string  method) const
bool Dali::TraceCallStack::FindMethod ( std::string  method) const

Search for a method in the stack.

Parameters
[in]methodThe name of the method
Returns
true if the method was in the stack
bool Dali::TraceCallStack::FindMethod ( std::string  method) const

Search for a method in the stack.

Parameters
[in]methodThe name of the method
Returns
true if the method was in the stack
bool Dali::TraceCallStack::FindMethodAndParams ( std::string  method,
std::string  params 
) const

Search for a method in the stack with the given parameter list.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
Returns
true if the method was in the stack
bool Dali::TraceCallStack::FindMethodAndParams ( std::string  method,
std::string  params 
) const

Search for a method in the stack with the given parameter list.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
Returns
true if the method was in the stack
bool Dali::TraceCallStack::FindMethodAndParams ( std::string  method,
std::string  params 
) const
const std::vector< std::vector< std::string > >& Dali::TraceCallStack::GetCallStack ( )
inline

Get the call stack.

Returns
The call stack object (Vector of vector[2] of method/paramlist strings)

Definition at line 105 of file test-trace-call-stack.h.

References mCallStack.

const std::vector< std::vector< std::string > >& Dali::TraceCallStack::GetCallStack ( )
inline

Get the call stack.

Returns
The call stack object (Vector of vector[2] of method/paramlist strings)

Definition at line 105 of file test-trace-call-stack.h.

References mCallStack.

const std::vector< std::vector< std::string > >& Dali::TraceCallStack::GetCallStack ( )
inline

Get the call stack.

Returns
The call stack object (Vector of vector[2] of method/paramlist strings)

Definition at line 105 of file test-trace-call-stack.h.

References mCallStack.

bool Dali::TraceCallStack::IsEnabled ( )
bool Dali::TraceCallStack::IsEnabled ( )

Definition at line 37 of file test-trace-call-stack.cpp.

References mTraceActive.

bool Dali::TraceCallStack::IsEnabled ( )
void Dali::TraceCallStack::PushCall ( std::string  method,
std::string  params 
)

Push a call onto the stack if the trace is active.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
void Dali::TraceCallStack::PushCall ( std::string  method,
std::string  params 
)

Push a call onto the stack if the trace is active.

Parameters
[in]methodThe name of the method
[in]paramsA comma separated list of parameter values
void Dali::TraceCallStack::PushCall ( std::string  method,
std::string  params 
)
void Dali::TraceCallStack::Reset ( )

Reset the call stack.

void Dali::TraceCallStack::Reset ( )
void Dali::TraceCallStack::Reset ( )

Reset the call stack.

bool Dali::TraceCallStack::TestMethodAndParams ( int  index,
std::string  method,
std::string  params 
) const

Test if the given method and parameters are at a given index in the stack.

Parameters
[in]indexIndex in the call stack
[in]methodName of method to test
[in]paramsA comma separated list of parameter values to test
bool Dali::TraceCallStack::TestMethodAndParams ( int  index,
std::string  method,
std::string  params 
) const

Test if the given method and parameters are at a given index in the stack.

Parameters
[in]indexIndex in the call stack
[in]methodName of method to test
[in]paramsA comma separated list of parameter values to test
bool Dali::TraceCallStack::TestMethodAndParams ( int  index,
std::string  method,
std::string  params 
) const

Test if the given method and parameters are at a given index in the stack.

Parameters
[in]indexIndex in the call stack
[in]methodName of method to test
[in]paramsA comma separated list of parameter values to test

Definition at line 124 of file test-trace-call-stack.cpp.

References mCallStack.

Referenced by UtcDaliBufferImageUpdate01(), UtcDaliBufferImageUpdate02(), UtcDaliGeometrySetGetGeometryType01(), UtcDaliGeometrySetGetGeometryType02(), UtcDaliImageActorSetFilterMode(), UtcSamplerSetFilterMode(), and UtcSamplerSetWrapMode().

Here is the caller graph for this function:

Member Data Documentation

std::vector< std::vector< std::string > > Dali::TraceCallStack::mCallStack
private
bool Dali::TraceCallStack::mTraceActive
private

True if the trace is active.

Definition at line 108 of file test-trace-call-stack.h.

Referenced by Enable(), IsEnabled(), and PushCall().


The documentation for this class was generated from the following files:
Dali Docs Home
Read more about Dali