ATLAS Offline Software
Loading...
Searching...
No Matches
SamplePtr.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef SAMPLE_HANDLER_SAMPLE_PTR_HH
6#define SAMPLE_HANDLER_SAMPLE_PTR_HH
7
8//
9// Distributed under the Boost Software License, Version 1.0.
10// (See accompanying file LICENSE_1_0.txt or copy at
11// http://www.boost.org/LICENSE_1_0.txt)
12
13// Please feel free to contact me (krumnack@iastate.edu) for bug
14// reports, feature suggestions, praise and complaints.
15
16
17
19
20#include <memory>
21
22namespace SH
23{
35 {
36 //
37 // public interface
38 //
39
44 public:
45 void testInvariant () const;
46
47
52 public:
53 SamplePtr ();
54
55
60 public:
61 SamplePtr (Sample *val_sample);
62
63
68 public:
69 explicit SamplePtr (std::unique_ptr<Sample> val_sample);
70
71
76 public:
77 SamplePtr (const SamplePtr& that);
78
79
84 public:
85 SamplePtr (SamplePtr&& that);
86
87
92 public:
93 ~SamplePtr ();
94
95
100 public:
101 SamplePtr& operator = (const SamplePtr& that);
102
103
108 public:
110
111
117 public:
118 bool empty () const;
119
120
126 public:
127 Sample *get ();
128
129
135 public:
136 const Sample *get () const;
137
138
145 public:
147
148
155 public:
156 const Sample *operator -> () const;
157
158
165 public:
167
168
175 public:
176 const Sample& operator * () const;
177
178
179
180 //
181 // private interface
182 //
183
185 private:
187 };
188}
189
190#endif
void testInvariant() const
test the invariant of this object
Definition SamplePtr.cxx:30
Sample * get()
the sample itself
Sample * operator->()
the sample itself
~SamplePtr()
standard destructor
Definition SamplePtr.cxx:90
Sample & operator*()
the sample itself
SamplePtr()
standard constructor
Definition SamplePtr.cxx:37
Sample * m_sample
the sample contained
Definition SamplePtr.h:186
SamplePtr & operator=(const SamplePtr &that)
standard assignment operator
bool empty() const
get() == 0
a base class that manages a set of files belonging to a particular data set and the associated meta-d...
Definition Sample.h:54
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition PrunDriver.h:15