Itasca C++ Interface
Toggle main menu visibility
Loading...
Searching...
No Matches
igrouplist.h
Go to the documentation of this file.
1
#pragma once
6
7
#include "
utility/interface/icontainer.h
"
8
#include "utility/interface/igroup.h"
9
10
#include <unordered_map>
11
12
#define USEGROUPCOUNT
// If not defined then group counting is disabled
13
14
namespace
itasca
{
16
class
IGroupList
{
17
public
:
19
inline
static
const
TType
type_
= 0x4ecd61c1;
21
using
name_signal
= shared::Signal<string,string>;
22
using
slot_signal = shared::Signal<string,uint32>;
23
enum class
Resolve { Write, ReadQuiet, ReadException };
24
26
virtual
const
IContainer
*
getIContainer
()
const
=0;
28
virtual
IContainer
*
getIContainer
()=0;
29
31
virtual
IGroupID
resolve
(
const
IGroupID
&input,Resolve
resolve
)=0;
32
34
virtual
StringList
getAllGroupNames
()
const
=0;
35
37
virtual
StringList
getAllSlotNames
()
const
=0;
38
39
#ifdef USEGROUPCOUNT
40
using
groupcount_signal = shared::Signal<TType, uint32>;
44
virtual
StringList
slotsFromType
(
TType
type)
const
=0;
45
46
// Returns the groups that have been assigned to objects with the general type type.
47
// If type==0 returns all groups assigned to slot for all types.
48
// If slot==ISlotID::anyName() "Any" then returns all groups assigned to that type in any slot.
49
// if both than returns the same as getAllGroupNames()
50
// See getGroupCountSignal to be notified of changes.
51
virtual
StringList
groupsFromTypeSlot(
TType
type,
const
string
&slot)
const
=0;
52
// This is emitted when a new slot is added to the list of those available to a type.
53
// It is also emitted when a new group is added to a group slot combination.
54
// In the former case the second argument is ISlotID::any_.
55
// It is NOT sent when the group count changes, or when a group or slot is *removed*.
56
virtual
groupcount_signal *getGroupCountSignal()
const
=0;
57
#endif
58
59
virtual
const
ISlot
* getSlot(
const
ISlotID
&
id
,Resolve r) = 0;
60
virtual
const
ISlot
* getSlot(
const
ISlotID
&
id
)
const
= 0;
61
virtual
const
ISlot
* getDefaultSlot()
const
=0;
62
virtual
const
ISlot
* getAnySlot()
const
= 0;
63
virtual
string
getSlotName(uint32 slot,uint32 thread)
const
= 0;
64
virtual
const
IGroup
*getGroup(
const
IGroupID
&
id
,Resolve r) = 0;
65
virtual
const
IGroup
*getGroup(
const
IGroupID
&
id
)
const
= 0;
66
virtual
const
IGroup
*getNullGroup()
const
=0;
67
69
virtual
name_signal
*
getGroupRenameSignal
()
const
=0;
70
virtual
name_signal
*getSlotRenameSignal()
const
=0;
71
// Emitted when slots are added or removed.
72
// Note on restore Added signal has string(), limits<uint32>::max() as arguments.
73
virtual
slot_signal *getSlotAddedSignal()
const
=0;
74
virtual
slot_signal *getSlotRemovedSignal()
const
=0;
75
};
76
}
// namespace itasca
77
// EoF
StringList
Definition
basestring.h:71
itasca::IContainer
Interface for containers of IThings.
Definition
icontainer.h:21
itasca::IGroup
Interface to a group object.
Definition
igroup.h:9
itasca::IGroupID
Definition
igroup.h:82
itasca::IGroupList
Group container class.
Definition
igrouplist.h:16
itasca::IGroupList::getIContainer
virtual const IContainer * getIContainer() const =0
Returns a const pointer to the container class representing a list of groups.
itasca::IGroupList::type_
static const TType type_
A unique type number that identifies this class, for use in convert_cast() and convert_getcast().
Definition
igrouplist.h:19
itasca::IGroupList::name_signal
shared::Signal< string, string > name_signal
Signal type used to notify system of changes.
Definition
igrouplist.h:21
itasca::IGroupList::resolve
virtual IGroupID resolve(const IGroupID &input, Resolve resolve)=0
Resolve (if necessary) a groupid into actual pointers.
itasca::IGroupList::getGroupRenameSignal
virtual name_signal * getGroupRenameSignal() const =0
Emitted when a group is renamed from arg1 to arg2.
itasca::IGroupList::slotsFromType
virtual StringList slotsFromType(TType type) const =0
itasca::IGroupList::getAllSlotNames
virtual StringList getAllSlotNames() const =0
Returns a list of all category names found in the container.
itasca::IGroupList::getIContainer
virtual IContainer * getIContainer()=0
Returns a pointer to the container class representing a list of groups.
itasca::IGroupList::getAllGroupNames
virtual StringList getAllGroupNames() const =0
Returns a list of all group names found in the container.
itasca::ISlot
Interface to a slot object.
Definition
igroup.h:23
itasca::ISlotID
Definition
igroup.h:41
TType
uint32 TType
class type indicator
Definition
basedef.h:47
icontainer.h
Interface for container of IThings.
itasca
namespace Itasca
Definition
basememory.cpp:14
common
module
interface
igrouplist.h
Generated by
1.18.0