diff --git a/ewol/compositing/Shaper.cpp b/ewol/compositing/Shaper.cpp index 7a9e5f5f..ca48de6c 100644 --- a/ewol/compositing/Shaper.cpp +++ b/ewol/compositing/Shaper.cpp @@ -622,11 +622,38 @@ bool ewol::compositing::Shaper::hasSources() { const etk::Color& ewol::compositing::Shaper::getColor(int32_t _id) { static const etk::Color errorValue(0,0,0,0); if (m_colorProperty == nullptr) { + EWOL_WARNING("nullptr of m_colorProperty ==> return #0000 for id " << _id); return errorValue; } return m_colorProperty->get(_id); } +int32_t ewol::compositing::Shaper::requestColor(const std::string& _name) { + if (m_colorProperty == nullptr) { + EWOL_WARNING("nullptr of m_colorProperty ==> return -1 for name " << _name); + return -1; + } + return m_colorProperty->request(_name); +} + +int32_t ewol::compositing::Shaper::requestConfig(const std::string& _name) { + if (m_config == nullptr) { + EWOL_WARNING("nullptr of m_config ==> return -1 for name " << _name); + return -1; + } + return m_config->request(_name); +} + +double ewol::compositing::Shaper::getConfigNumber(int32_t _id) { + if ( _id == -1 + || m_config == nullptr) { + EWOL_WARNING("nullptr of m_config ==> return 0.0 for id " << _id); + return 0.0; + } + return m_config->getNumber(_id); +} + + namespace etk { template<> std::string to_string(const ewol::compositing::Shaper& _obj) { return _obj.getSource(); @@ -641,5 +668,4 @@ namespace etk { template<> bool from_string(ewol::compositing::Shaper& _variableRet, const std::u32string& _value) { return from_string(_variableRet, etk::to_string(_value)); } -}; - +}; \ No newline at end of file diff --git a/ewol/compositing/Shaper.h b/ewol/compositing/Shaper.h index fd70d786..df479184 100644 --- a/ewol/compositing/Shaper.h +++ b/ewol/compositing/Shaper.h @@ -231,12 +231,7 @@ namespace ewol { * @param[in] _name Name of the element requested * @return The Id of the color */ - int32_t requestColor(const std::string& _name) { - if (m_colorProperty == nullptr) { - return -1; - } - return m_colorProperty->request(_name); - } + int32_t requestColor(const std::string& _name); /** * @brief Get The color associated at an ID. * @param[in] _id Id of the color @@ -249,24 +244,13 @@ namespace ewol { * @param[in] _name Name of the element requested * @return The Id of the element */ - int32_t requestConfig(const std::string& _name) { - if (m_config == nullptr) { - return -1; - } - return m_config->request(_name); - } + int32_t requestConfig(const std::string& _name); /** * @brief Get The number associated at an ID. * @param[in] _id Id of the parameter * @return the requested number. */ - double getConfigNumber(int32_t _id) { - if ( _id == -1 - || m_config == nullptr) { - return 0.0; - } - return m_config->getNumber(_id); - } + double getConfigNumber(int32_t _id); public: /** * @brief Set activate state of the element