[DEV] change ewol::signal::List in ewol::signal::Interface
This commit is contained in:
parent
61afe48646
commit
ec3c7b2902
2
external/ege
vendored
2
external/ege
vendored
@ -1 +1 @@
|
||||
Subproject commit 343021de91b1662da5dafe9ae9b6a089bb5edcfc
|
||||
Subproject commit 6adec3434ea382c94554f5d8fac3b60573eae382
|
@ -17,7 +17,7 @@
|
||||
namespace ewol {
|
||||
class Context;
|
||||
namespace object {
|
||||
class Manager : public ewol::signal::List {
|
||||
class Manager : public ewol::signal::Interface {
|
||||
private:
|
||||
std::vector<std::weak_ptr<ewol::Object>> m_eObjectList; // all widget allocated == > all time increment ... never removed ...
|
||||
Context& m_context;
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <ewol/parameter/Value.h>
|
||||
#include <ewol/parameter/Range.h>
|
||||
#include <ewol/parameter/List.h>
|
||||
#include <ewol/signal/List.h>
|
||||
#include <ewol/signal/Interface.h>
|
||||
|
||||
namespace ewol {
|
||||
// some class need to define element befor other ...
|
||||
@ -52,7 +52,7 @@ namespace ewol {
|
||||
*/
|
||||
class Object : public std::enable_shared_from_this<Object>,
|
||||
public ewol::parameter::Interface,
|
||||
public ewol::signal::List {
|
||||
public ewol::signal::Interface {
|
||||
private:
|
||||
static size_t m_valUID; //!< Static used for the unique ID definition
|
||||
private:
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/signal/List.h>
|
||||
#include <ewol/signal/Interface.h>
|
||||
#include <ewol/signal/Base.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
@ -16,16 +16,16 @@
|
||||
int32_t ewol::signal::Base::m_signalCallLevel = 0;
|
||||
#endif
|
||||
|
||||
ewol::signal::Base::Base(ewol::signal::List& _signalLink,
|
||||
ewol::signal::Base::Base(ewol::signal::Interface& _signalInterfaceLink,
|
||||
const std::string& _name,
|
||||
const std::string& _description) :
|
||||
m_signalLink(_signalLink),
|
||||
m_signalInterfaceLink(_signalInterfaceLink),
|
||||
m_name(_name),
|
||||
m_description(_description),
|
||||
m_callInProgress(0),
|
||||
m_someOneRemoveInCall(false) {
|
||||
// add a reference on the current signal ...
|
||||
m_signalLink.signalAdd(this);
|
||||
m_signalInterfaceLink.signalAdd(this);
|
||||
}
|
||||
|
||||
std::ostream& ewol::signal::operator <<(std::ostream& _os, const ewol::signal::Base& _obj) {
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef __EWOL_SIGNAL_BASE_H__
|
||||
#define __EWOL_SIGNAL_BASE_H__
|
||||
|
||||
#include <ewol/signal/List.h>
|
||||
#include <ewol/signal/Interface.h>
|
||||
|
||||
|
||||
namespace ewol {
|
||||
@ -20,7 +20,7 @@ namespace ewol {
|
||||
static int32_t m_uidSignal;
|
||||
static int32_t m_signalCallLevel;
|
||||
#endif
|
||||
ewol::signal::List& m_signalLink;
|
||||
ewol::signal::Interface& m_signalInterfaceLink;
|
||||
std::string m_name;
|
||||
std::string m_description;
|
||||
int32_t m_callInProgress;
|
||||
@ -28,11 +28,11 @@ namespace ewol {
|
||||
public:
|
||||
/**
|
||||
* @brief Create a parameter with a specific type.
|
||||
* @param[in] _signalListLink reference on the signal list.
|
||||
* @param[in] _signalInterfaceLink reference on the signal list.
|
||||
* @param[in] _name Static name of the parameter.
|
||||
* @param[in] _description description of the parameter.
|
||||
*/
|
||||
Base(ewol::signal::List& _signalListLink,
|
||||
Base(ewol::signal::Interface& _signalInterfaceLink,
|
||||
const std::string& _name,
|
||||
const std::string& _description = "");
|
||||
/**
|
||||
|
@ -8,19 +8,19 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ewol/debug.h>
|
||||
#include <ewol/signal/List.h>
|
||||
#include <ewol/signal/Interface.h>
|
||||
#include <ewol/signal/Base.h>
|
||||
|
||||
ewol::signal::List::List() {
|
||||
ewol::signal::Interface::Interface() {
|
||||
|
||||
}
|
||||
|
||||
ewol::signal::List::~List() {
|
||||
ewol::signal::Interface::~Interface() {
|
||||
m_list.clear();
|
||||
}
|
||||
|
||||
// note this pointer is not allocated and not free at the end of the class
|
||||
void ewol::signal::List::signalAdd(ewol::signal::Base* _pointerOnSignal) {
|
||||
void ewol::signal::Interface::signalAdd(ewol::signal::Base* _pointerOnSignal) {
|
||||
if (_pointerOnSignal == nullptr) {
|
||||
EWOL_ERROR("Try to link a nullptr parameters");
|
||||
return;
|
||||
@ -28,7 +28,7 @@ void ewol::signal::List::signalAdd(ewol::signal::Base* _pointerOnSignal) {
|
||||
m_list.push_back(_pointerOnSignal);
|
||||
}
|
||||
|
||||
std::vector<std::string> ewol::signal::List::signalGetAll() const {
|
||||
std::vector<std::string> ewol::signal::Interface::signalGetAll() const {
|
||||
std::vector<std::string> out;
|
||||
for (auto &it : m_list) {
|
||||
if(it != nullptr) {
|
||||
@ -38,7 +38,7 @@ std::vector<std::string> ewol::signal::List::signalGetAll() const {
|
||||
return out;
|
||||
}
|
||||
|
||||
void ewol::signal::List::signalUnBindAll(const std::shared_ptr<void>& _object) {
|
||||
void ewol::signal::Interface::signalUnBindAll(const std::shared_ptr<void>& _object) {
|
||||
if (_object == nullptr) {
|
||||
EWOL_ERROR("Input ERROR nullptr pointer Object ...");
|
||||
return;
|
@ -7,8 +7,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __EWOL_SIGNAL_LIST_H__
|
||||
#define __EWOL_SIGNAL_LIST_H__
|
||||
#ifndef __EWOL_SIGNAL_INTERFACE_H__
|
||||
#define __EWOL_SIGNAL_INTERFACE_H__
|
||||
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@ -16,7 +16,7 @@
|
||||
namespace ewol {
|
||||
namespace signal {
|
||||
class Base;
|
||||
class List {
|
||||
class Interface {
|
||||
friend class ewol::signal::Base; // to register parameter in the list.
|
||||
private:
|
||||
std::vector<ewol::signal::Base*> m_list; //!< list of availlable Parameters
|
||||
@ -24,11 +24,11 @@ namespace ewol {
|
||||
/**
|
||||
* @brief Constructor.
|
||||
*/
|
||||
List();
|
||||
Interface();
|
||||
/**
|
||||
* @brief Destructor.
|
||||
*/
|
||||
~List();
|
||||
~Interface();
|
||||
/**
|
||||
* @brief Register a parameter class pointer in the List of parameters
|
||||
* @note This class does not destroy the parameter pointer!!!
|
@ -24,17 +24,17 @@ namespace ewol {
|
||||
public:
|
||||
/**
|
||||
* @brief Create a parameter with a specific type.
|
||||
* @param[in] _objectLink reference on the parameter lister.
|
||||
* @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.
|
||||
*/
|
||||
Signal(ewol::signal::List& _objectLink,
|
||||
Signal(ewol::signal::Interface& _signalInterfaceLink,
|
||||
const std::string& _name,
|
||||
const std::string& _description = "") :
|
||||
signal::Base(_objectLink, _name, _description) {
|
||||
signal::Base(_signalInterfaceLink, _name, _description) {
|
||||
|
||||
};
|
||||
/**
|
||||
@ -171,17 +171,17 @@ namespace ewol {
|
||||
public:
|
||||
/**
|
||||
* @brief Create a parameter with a specific type.
|
||||
* @param[in] _objectLink reference on the parameter lister.
|
||||
* @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.
|
||||
*/
|
||||
Signal(ewol::signal::List& _objectLink,
|
||||
Signal(ewol::signal::Interface& _signalInterfaceLink,
|
||||
const std::string& _name,
|
||||
const std::string& _description = "") :
|
||||
signal::Base(_objectLink, _name, _description) {
|
||||
signal::Base(_signalInterfaceLink, _name, _description) {
|
||||
|
||||
};
|
||||
/**
|
||||
|
@ -99,7 +99,7 @@ def create(target):
|
||||
])
|
||||
# Signal :
|
||||
myModule.add_src_file([
|
||||
'ewol/signal/List.cpp',
|
||||
'ewol/signal/Interface.cpp',
|
||||
'ewol/signal/Base.cpp'
|
||||
])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user