Dali 3D User Interface Engine
Typedefs | Enumerations | Functions | Variables
Dali::Integration::Log Namespace Reference

Typedefs

typedef void(* LogFunction )(DebugPriority priority, std::string &message)
 typedef for the logging function. More...
 

Enumerations

enum  DebugPriority { DebugInfo, DebugWarning, DebugError }
 

Functions

std::string FormatToString (const char *format,...)
 
std::string ArgListToString (const char *format, va_list args)
 
void LogMessage (enum DebugPriority level, const char *format,...)
 Used by logging macros to log a message along with function/class name. More...
 
void InstallLogFunction (const LogFunction &logFunction)
 A log function has to be installed for every thread that wants to use logging. More...
 
void UninstallLogFunction ()
 A log function has to be uninstalled for every thread that wants to use logging. More...
 
std::string ColorToString (const Vector4 &color)
 Helper method to translate a color to a string. More...
 
std::string Vector4ToString (const Vector4 &v, size_t precision=3, size_t indent=0)
 Helper method to translate a vector4 to a string. More...
 
std::string Vector3ToString (const Vector3 &v, size_t precision=3, size_t indent=0)
 Helper method to translate a vector4 to a string. More...
 
std::string QuaternionToString (const Quaternion &q, size_t precision=3, size_t indent=0)
 Helper method to translate a quaternion to a string. More...
 
std::string Matrix3ToString (const Matrix3 &m, size_t precision=3, size_t indent=0)
 Helper method to translate a 3x3 matrix to a string. More...
 
std::string MatrixToString (const Matrix &m, size_t precision=3, size_t indent=0)
 Helper method to translate a 4x4 matrix to a string. More...
 

Variables

__thread LogFunction gthreadLocalLogFunction = NULL
 

Typedef Documentation

typedef void(* Dali::Integration::Log::LogFunction)(DebugPriority priority, std::string &message)

typedef for the logging function.

Definition at line 65 of file debug.h.

Enumeration Type Documentation

Enumerator
DebugInfo 
DebugWarning 
DebugError 

Definition at line 48 of file debug.h.

Function Documentation

std::string Dali::Integration::Log::ArgListToString ( const char *  format,
va_list  args 
)

Definition at line 251 of file debug.cpp.

Referenced by FormatToString(), and LogMessage().

Here is the caller graph for this function:

DALI_IMPORT_API std::string Dali::Integration::Log::ColorToString ( const Vector4 &  color)

Helper method to translate a color to a string.

Parameters
[in]color- the color to translate
Returns
string - the text representation of the color.

Definition at line 276 of file debug.cpp.

References Dali::Vector4::a, Dali::Vector4::b, Dali::Vector4::g, and Dali::Vector4::r.

std::string Dali::Integration::Log::FormatToString ( const char *  format,
  ... 
)

Definition at line 267 of file debug.cpp.

References ArgListToString().

Here is the call graph for this function:

DALI_IMPORT_API void Dali::Integration::Log::InstallLogFunction ( const LogFunction &  logFunction)

A log function has to be installed for every thread that wants to use logging.

This should be done by the adaptor. The log function can be different for each thread.

Parameters
logFunctionthe log function to install
logOptsthe log options to save in thread

Definition at line 106 of file debug.cpp.

References gthreadLocalLogFunction.

Referenced by Dali::TestApplication::Initialize(), Dali::Internal::Adaptor::EnvironmentOptions::InstallLogFunction(), and Dali::TizenPlatform::ResourceThreadBase::InstallLogging().

Here is the caller graph for this function:

DALI_IMPORT_API void Dali::Integration::Log::LogMessage ( enum DebugPriority  level,
const char *  format,
  ... 
)
DALI_IMPORT_API std::string Dali::Integration::Log::Matrix3ToString ( const Matrix3 &  m,
size_t  precision = 3,
size_t  indent = 0 
)

Helper method to translate a 3x3 matrix to a string.

Parameters
[in]m- the matrix
[in]precision- the precision to write the float data.
[in]indent- the indent level to use.
Returns
string - the text representation of the vector.

Definition at line 318 of file debug.cpp.

References Dali::anonymous_namespace{debug.cpp}::Array2DToString(), and Dali::Matrix3::AsFloat().

Here is the call graph for this function:

DALI_IMPORT_API std::string Dali::Integration::Log::MatrixToString ( const Matrix &  m,
size_t  precision = 3,
size_t  indent = 0 
)

Helper method to translate a 4x4 matrix to a string.

Parameters
[in]m- the matrix
[in]precision- the precision to write the float data.
[in]indent- the indent level to use.
Returns
string - the text representation of the vector.

Definition at line 323 of file debug.cpp.

References Dali::anonymous_namespace{debug.cpp}::Array2DToString(), and Dali::Matrix::AsFloat().

Referenced by Dali::Internal::SceneGraph::PrintNodes().

Here is the call graph for this function:

Here is the caller graph for this function:

DALI_IMPORT_API std::string Dali::Integration::Log::QuaternionToString ( const Quaternion &  q,
size_t  precision = 3,
size_t  indent = 0 
)

Helper method to translate a quaternion to a string.

Parameters
[in]qthe quaternion
[in]precision- the precision to write the float data.
[in]indent- the indent level to use.
Returns
string - the text representation of the quaternion.

Definition at line 304 of file debug.cpp.

References Dali::Degree::degree, Dali::Quaternion::ToAxisAngle(), and Vector3ToString().

Here is the call graph for this function:

DALI_IMPORT_API void Dali::Integration::Log::UninstallLogFunction ( )

A log function has to be uninstalled for every thread that wants to use logging.

The log function can be different for each thread.

Definition at line 114 of file debug.cpp.

References gthreadLocalLogFunction.

Referenced by Dali::Internal::Adaptor::EnvironmentOptions::UnInstallLogFunction(), Dali::TizenPlatform::ResourceThreadBase::UninstallLogging(), Dali::Internal::Adaptor::Adaptor::~Adaptor(), and Dali::TestApplication::~TestApplication().

Here is the caller graph for this function:

DALI_IMPORT_API std::string Dali::Integration::Log::Vector3ToString ( const Vector3 &  v,
size_t  precision = 3,
size_t  indent = 0 
)

Helper method to translate a vector4 to a string.

Parameters
[in]v- the vector
[in]precision- the precision to write the float data.
[in]indent- the indent level to use.
Returns
string - the text representation of the vector.

Definition at line 294 of file debug.cpp.

References Dali::Vector3::x, Dali::Vector3::y, and Dali::Vector3::z.

Referenced by QuaternionToString().

Here is the caller graph for this function:

DALI_IMPORT_API std::string Dali::Integration::Log::Vector4ToString ( const Vector4 &  v,
size_t  precision = 3,
size_t  indent = 0 
)

Helper method to translate a vector4 to a string.

Parameters
[in]v- the vector
[in]precision- the precision to write the float data.
[in]indent- the indent level to use.
Returns
string - the text representation of the vector.

Definition at line 283 of file debug.cpp.

References Dali::Vector4::w, Dali::Vector4::x, Dali::Vector4::y, and Dali::Vector4::z.

Variable Documentation

__thread LogFunction Dali::Integration::Log::gthreadLocalLogFunction = NULL

Definition at line 85 of file debug.cpp.

Referenced by InstallLogFunction(), LogMessage(), and UninstallLogFunction().

Dali Docs Home
Read more about Dali