[DEV] update signal interface to remove periodic signal in debug log level

This commit is contained in:
Edouard DUPIN 2015-09-29 21:12:20 +02:00
parent 0abe3cfdfc
commit 6d8c375365
5 changed files with 47 additions and 28 deletions

View File

@ -17,7 +17,7 @@
ewol::object::Manager::Manager(ewol::Context& _context) :
m_context(_context),
periodicCall(*this, "periodic", "Call every time system render"),
periodicCall(*this, "periodic", "Call every time system render", true),
m_applWakeUpTime(0),
m_lastPeriodicCallTime(0) {
EWOL_DEBUG(" == > init Object-Manager");

View File

@ -18,12 +18,14 @@
ewol::signal::Base::Base(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description) :
const std::string& _description,
bool _periodic) :
m_signalInterfaceLink(_signalInterfaceLink),
m_name(_name),
m_description(_description),
m_callInProgress(0),
m_someOneRemoveInCall(false) {
m_someOneRemoveInCall(false),
m_periodic(_periodic) {
// add a reference on the current signal ...
m_signalInterfaceLink.signalAdd(this);
}

View File

@ -25,16 +25,19 @@ namespace ewol {
std::string m_description;
int32_t m_callInProgress;
bool m_someOneRemoveInCall;
bool m_periodic;
public:
/**
* @brief Create a parameter with a specific type.
* @param[in] _signalInterfaceLink reference on the signal list.
* @param[in] _name Static name of the parameter.
* @param[in] _description description of the parameter.
* @param[in] _periodic Customisation of the log display tag at true to down debug lebel at verbose.
*/
Base(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description = "");
const std::string& _name,
const std::string& _description = "",
bool _periodic = false);
/**
* @brief Destructor.
*/

View File

@ -23,18 +23,17 @@ namespace ewol {
std::function<void(const T&)>>> m_callerListInCallback; // temporaty list (when add one in call process)
public:
/**
* @brief Create a parameter with a specific type.
* @param[in] _signalInterfaceLink reference on the parameter lister.
* @param[in] _name Static name of the parameter.
* @param[in] _defaultValue Default value of the parameter.
* @param[in] _min Minumum value.
* @param[in] _max Maximum value.
* @param[in] _description description of the parameter.
* @brief Create a signal with a specific type.
* @param[in] _signalInterfaceLink reference on the signal lister.
* @param[in] _name Static name of the signal.
* @param[in] _description Description of the signal.
* @param[in] _periodic Customisation of the log display tag at true to down debug lebel at verbose.
*/
Signal(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description = "") :
signal::Base(_signalInterfaceLink, _name, _description) {
const std::string& _description = "",
bool _periodic = false) :
signal::Base(_signalInterfaceLink, _name, _description, _periodic) {
};
/**
@ -144,7 +143,11 @@ namespace ewol {
int32_t tmpID = m_uidSignal++;
#endif
m_callInProgress++;
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' data='" << etk::to_string(_data) << "' to: " << m_callerList.size() << " element(s)");
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' data='" << etk::to_string(_data) << "' to: " << m_callerList.size() << " element(s)");
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' data='" << etk::to_string(_data) << "' to: " << m_callerList.size() << " element(s)");
}
auto it(m_callerList.begin());
while (it != m_callerList.end()) {
std::shared_ptr<void> destObject = it->first.lock();
@ -153,7 +156,11 @@ namespace ewol {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " nullptr dest");
continue;
}
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
}
it->second(_data);
++it;
}
@ -194,18 +201,17 @@ namespace ewol {
std::vector<std::pair<std::weak_ptr<void>, std::function<void()>>> m_callerListInCallback;
public:
/**
* @brief Create a parameter with a specific type.
* @param[in] _signalInterfaceLink reference on the parameter lister.
* @param[in] _name Static name of the parameter.
* @param[in] _defaultValue Default value of the parameter.
* @param[in] _min Minumum value.
* @param[in] _max Maximum value.
* @param[in] _description description of the parameter.
* @brief Create a signal with a specific 'void' type.
* @param[in] _signalInterfaceLink reference on the signal lister.
* @param[in] _name Static name of the signal.
* @param[in] _description Description of the signal.
* @param[in] _periodic Customisation of the log display tag at true to down debug lebel at verbose.
*/
Signal(ewol::signal::Interface& _signalInterfaceLink,
const std::string& _name,
const std::string& _description = "") :
signal::Base(_signalInterfaceLink, _name, _description) {
const std::string& _description = "",
bool _periodic = false) :
signal::Base(_signalInterfaceLink, _name, _description, _periodic) {
};
/**
@ -277,7 +283,11 @@ namespace ewol {
int32_t tmpID = m_uidSignal++;
#endif
m_callInProgress++;
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' to: " << m_callerList.size() << " element(s)");
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' to: " << m_callerList.size() << " element(s)");
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << "emit signal{" << tmpID << "} : signal='" << m_name << "' to: " << m_callerList.size() << " element(s)");
}
auto it(m_callerList.begin());
while (it != m_callerList.end()) {
std::shared_ptr<void> destObject = it->first.lock();
@ -286,7 +296,11 @@ namespace ewol {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " nullptr dest");
continue;
}
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
if (m_periodic == true) {
EWOL_VERBOSE(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
} else {
EWOL_DEBUG(ewol::signal::logIndent(m_signalCallLevel-1) << " signal{" << tmpID << "} :");// [" << destObject->getId() << "]" << destObject->getObjectType());
}
it->second();
++it;
}

View File

@ -73,7 +73,7 @@ std::shared_ptr<ewol::Widget> ewol::widget::Windows::getWidgetAtPos(const vec2&
}
void ewol::widget::Windows::sysDraw() {
EWOL_DEBUG("Drow on " << m_size);
EWOL_VERBOSE("Draw on " << m_size);
// set the size of the open GL system
gale::openGL::setViewPort(vec2(0,0), m_size);
gale::openGL::disable(gale::openGL::flag_dither);