Fireworks
Core
interface
FWModelId.h
Go to the documentation of this file.
1
#ifndef Fireworks_Core_FWModelId_h
2
#define Fireworks_Core_FWModelId_h
3
// -*- C++ -*-
4
//
5
// Package: Core
6
// Class : FWModelId
7
//
16
//
17
// Original Author: Chris Jones
18
// Created: Fri Jan 18 12:44:26 EST 2008
19
//
20
21
// system include files
22
23
// user include files
24
class
FWEventItem
;
25
26
// forward declarations
27
28
class
FWModelId
{
29
public
:
30
enum
{
kContainerIndex
= -1 };
31
FWModelId
(
const
FWEventItem
* iItem =
nullptr
,
int
iIndex =
kContainerIndex
) :
m_item
(iItem),
m_index
(iIndex) {}
32
//virtual ~FWModelId();
33
34
// ---------- const member functions ---------------------
35
bool
operator<
(
const
FWModelId
& iRHS)
const
{
36
return
m_item
== iRHS.
m_item
?
m_index
< iRHS.
m_index
:
m_item
< iRHS.
m_item
;
37
}
38
39
const
FWEventItem
*
item
()
const
{
return
m_item
; }
40
41
int
index
()
const
{
return
m_index
; }
42
// ---------- static member functions --------------------
43
44
// ---------- member functions ---------------------------
45
void
unselect
()
const
;
46
void
select
()
const
;
47
void
toggleSelect
()
const
;
48
void
setIndex
(
int
iIndex) {
m_index
= iIndex; }
49
50
private
:
51
//FWModelId(const FWModelId&); // stop default
52
53
//const FWModelId& operator=(const FWModelId&); // stop default
54
55
// ---------- member data --------------------------------
56
const
FWEventItem
*
m_item
;
57
int
m_index
;
58
};
59
60
#endif
FWModelId::FWModelId
FWModelId(const FWEventItem *iItem=nullptr, int iIndex=kContainerIndex)
Definition:
FWModelId.h:31
FWModelId::m_item
const FWEventItem * m_item
Definition:
FWModelId.h:56
FWModelId::toggleSelect
void toggleSelect() const
Definition:
FWModelId.cc:76
FWModelId
Definition:
FWModelId.h:28
FWModelId::operator<
bool operator<(const FWModelId &iRHS) const
Definition:
FWModelId.h:35
FWModelId::setIndex
void setIndex(int iIndex)
Definition:
FWModelId.h:48
FWModelId::item
const FWEventItem * item() const
Definition:
FWModelId.h:39
FWModelId::unselect
void unselect() const
Definition:
FWModelId.cc:65
FWModelId::kContainerIndex
Definition:
FWModelId.h:30
FWModelId::index
int index() const
Definition:
FWModelId.h:41
FWModelId::select
void select() const
Definition:
FWModelId.cc:70
FWModelId::m_index
int m_index
Definition:
FWModelId.h:57
FWEventItem
Definition:
FWEventItem.h:56
Generated for CMSSW Reference Manual by
1.8.16