DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
model_common_interface_macros.hpp File Reference
Include dependency graph for model_common_interface_macros.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MODEL_COMMON_INTERFACE_TYPES(classname)
#define MODEL_COMMON_IMPL_REQ_DEF(classname)
#define MODEL_COMMON_INTERFACE_REQ_DEF(classname)
#define MODEL_REMOVE_ROWS_DEF(classname)
#define MODEL_DELETE_OBJECTS_DEF(classname)
#define MODEL_CREATE_OBJECTS_DEF(classname)
#define MODEL_UPDATE_OBJECTS_DEF(classname)
#define MODEL_RENAME_OBJECTS_DEF(classname)
#define MODEL_COMMON_INTERFACE_LOOKUP_IMPL(classname)
#define MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL(classname)
#define MODEL_COMMON_INTERFACE_SLOTS_DEF(classname)

Macro Definition Documentation

◆ MODEL_COMMON_IMPL_REQ_DEF

#define MODEL_COMMON_IMPL_REQ_DEF ( classname)
Value:
\
friend class model_common_async_operations<classname>; \
friend class model_common_impl<classname>; \
\
public: \
QModelIndex lookup(dbe::dref const&) override; \
\
MODEL_COMMON_INTERFACE_TYPES(classname) \
\
type_object_ref getobject(type_index const& index) const override; \
type_class_info getclass(const QModelIndex& index) const override; \
QAbstractItemModel* ReturnSourceModel() const override; \
\
private: \
void remove_deleted_object(type_index const& index) override; \
void create_contained_object(type_index const& index, type_object_info const& obj) override; \
void rename_contained_object(type_index const& index, type_object_info const& obj) override; \
void update_contained_object(type_index const& index, type_object_info const& obj) override; \
\
bool removeRows(int row, int count, type_index const& parent) override; \
\
config_object_description dref

Definition at line 30 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL

#define MODEL_COMMON_INTERFACE_CREATE_THAT_OBJ_IMPL ( classname)
Value:
void classname::create_contained_object(type_index const& index, type_object_info const& obj)

Macro to define the method in derived models that actually does the work of creating artifacts related to an object from a model

Definition at line 111 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL

#define MODEL_COMMON_INTERFACE_DELETE_THAT_OBJ_IMPL ( classname)
Value:
void classname::remove_deleted_object(type_index const& index)

Macro to define the method in derived models that actually does the work of removing artifacts related to an object from a model

Definition at line 104 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_LOOKUP_IMPL

#define MODEL_COMMON_INTERFACE_LOOKUP_IMPL ( classname)
Value:
QModelIndex classname::lookup(type_object_info const& obj)

Macro to define the method in derived models that actually does the work of searching from an object for the index of artifacts related to an object from a model

Definition at line 98 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL

#define MODEL_COMMON_INTERFACE_RENAME_THAT_OBJ_IMPL ( classname)
Value:
void classname::rename_contained_object(type_index const& index, type_object_info const& obj)

Macro to define the method in derived models that actually does the work of removing artifacts related to an object from a model

Definition at line 118 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_REQ_DEF

#define MODEL_COMMON_INTERFACE_REQ_DEF ( classname)
Value:
\
MODEL_COMMON_IMPL_REQ_DEF(classname) \
\
public: \
bool delete_objects(type_indices::iterator, type_indices::iterator) override; \
bool create_objects(type_indices::iterator, type_indices::iterator) override; \
bool update_objects(type_indices::iterator, type_indices::iterator) override; \
\
private:

Definition at line 55 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_SLOTS_DEF

#define MODEL_COMMON_INTERFACE_SLOTS_DEF ( classname)
Value:
void classname::slot_remove_object(QString const& src, type_object_info const& obj) \
{ \
if (uuid.toString() != src) { \
remove_object(obj); \
} \
} \
\
void classname::slot_update_object(QString const& src, type_object_info const& obj) \
{ \
if (uuid.toString() != src) { \
update_object(obj); \
} \
} \
\
void classname::slot_rename_object(QString const& src, type_object_info const& obj) \
{ \
if (uuid.toString() != src) { \
rename_object(obj); \
} \
} \
\
void classname::slot_create_object(QString const& src, type_object_info const& obj) \
{ \
if (uuid.toString() != src) { \
create_object(obj); \
} \
}

Definition at line 136 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_TYPES

#define MODEL_COMMON_INTERFACE_TYPES ( classname)
Value:
\
typedef model_common_async_operations<classname>::type_index type_index; \
typedef model_common_async_operations<classname>::type_indices type_indices; \
typedef model_common_async_operations<classname>::type_object_ref type_object_ref; \
typedef model_common_async_operations<classname>::type_class_info type_class_info; \
typedef model_common_async_operations<classname>::type_object_info type_object_info; \
\

Definition at line 19 of file model_common_interface_macros.hpp.

◆ MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL

#define MODEL_COMMON_INTERFACE_UPDATE_THAT_OBJ_IMPL ( classname)
Value:
void classname::update_contained_object(type_index const& index, type_object_info const& obj)

Macro to define the method in derived models that actually does the work of updating artifacts related to an object from a model

Definition at line 125 of file model_common_interface_macros.hpp.

◆ MODEL_CREATE_OBJECTS_DEF

#define MODEL_CREATE_OBJECTS_DEF ( classname)
Value:
bool classname::create_objects(type_indices::iterator b, type_indices::iterator e)

Definition at line 76 of file model_common_interface_macros.hpp.

◆ MODEL_DELETE_OBJECTS_DEF

#define MODEL_DELETE_OBJECTS_DEF ( classname)
Value:
bool classname::delete_objects(type_indices::iterator b, type_indices::iterator e)

Definition at line 73 of file model_common_interface_macros.hpp.

◆ MODEL_REMOVE_ROWS_DEF

#define MODEL_REMOVE_ROWS_DEF ( classname)
Value:
bool classname::removeRows(int row, int count, type_index const& parent)

Definition at line 69 of file model_common_interface_macros.hpp.

◆ MODEL_RENAME_OBJECTS_DEF

#define MODEL_RENAME_OBJECTS_DEF ( classname)
Value:
bool classname::rename_objects( \
type_indices::iterator b, \
type_indices::iterator \
e)

Definition at line 82 of file model_common_interface_macros.hpp.

◆ MODEL_UPDATE_OBJECTS_DEF

#define MODEL_UPDATE_OBJECTS_DEF ( classname)
Value:
bool classname::update_objects(type_indices::iterator b, type_indices::iterator e)

Definition at line 79 of file model_common_interface_macros.hpp.