ChimeraTK-DeviceAccess  03.18.00
BackendRegisterCatalogue.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Deutsches Elektronen-Synchrotron DESY, MSK, ChimeraTK Project <chimeratk-support@desy.de>
2 // SPDX-License-Identifier: LGPL-3.0-or-later
3 #pragma once
4 
5 #include "RegisterCatalogue.h"
6 
7 #include <boost/make_shared.hpp>
8 
9 namespace ChimeraTK {
10 
11  template<typename BackendRegisterInfo>
13 
14  template<typename BackendRegisterInfo>
16 
17  /********************************************************************************************************************/
18  /* Register catalogue container class definitions ******************************************************************/
19  /********************************************************************************************************************/
20 
23  public:
24  BackendRegisterCatalogueBase() = default;
25 
27 
29 
30  virtual ~BackendRegisterCatalogueBase() = default;
31 
32  // Copy constructor/assignment is deleted. It could be implemented (need to take care of pointers in
33  // insertionOrderedCatalogue), but currently there is no need for this and hence it is not done.
36 
42  [[nodiscard]] virtual RegisterInfo getRegister(const RegisterPath& registerPathName) const = 0;
43 
45  [[nodiscard]] virtual bool hasRegister(const RegisterPath& registerPathName) const = 0;
46 
48  [[nodiscard]] virtual size_t getNumberOfRegisters() const = 0;
49 
51  [[nodiscard]] virtual std::unique_ptr<const_RegisterCatalogueImplIterator> getConstIteratorBegin() const = 0;
52 
54  [[nodiscard]] virtual std::unique_ptr<const_RegisterCatalogueImplIterator> getConstIteratorEnd() const = 0;
55 
57  [[nodiscard]] virtual std::unique_ptr<BackendRegisterCatalogueBase> clone() const = 0;
58  };
59 
60  /********************************************************************************************************************/
61 
69  template<typename BackendRegisterInfo>
71  public:
74  [[nodiscard]] virtual BackendRegisterInfo getBackendRegister(const RegisterPath& registerPathName) const;
75 
76  [[nodiscard]] bool hasRegister(const RegisterPath& registerPathName) const override;
77 
79  [[nodiscard]] RegisterInfo getRegister(const RegisterPath& registerPathName) const final;
80 
81  [[nodiscard]] size_t getNumberOfRegisters() const override;
82 
83  [[nodiscard]] std::unique_ptr<const_RegisterCatalogueImplIterator> getConstIteratorBegin() const override;
84 
85  [[nodiscard]] std::unique_ptr<const_RegisterCatalogueImplIterator> getConstIteratorEnd() const override;
86 
87  [[nodiscard]] std::unique_ptr<BackendRegisterCatalogueBase> clone() const override;
88 
93  void addRegister(const BackendRegisterInfo& registerInfo);
94 
99  void removeRegister(const RegisterPath& name);
100 
109  void modifyRegister(const BackendRegisterInfo& registerInfo);
110 
113  return BackendRegisterCatalogueImplIterator<BackendRegisterInfo>{insertionOrderedCatalogue.begin()};
114  }
115 
118  return BackendRegisterCatalogueImplIterator<BackendRegisterInfo>{insertionOrderedCatalogue.end()};
119  }
120 
123  return const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>{insertionOrderedCatalogue.begin()};
124  }
125 
128  return const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>{insertionOrderedCatalogue.end()};
129  }
130 
133  return const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>{insertionOrderedCatalogue.begin()};
134  }
135 
138  return const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>{insertionOrderedCatalogue.end()};
139  }
140 
141  protected:
146 
147  private:
148  // Always access the catalogue through the member functions. Modifications need special care to keep the two
149  // containers synchronised, hence these members are made private.
150  std::map<RegisterPath, BackendRegisterInfo> catalogue;
151  std::vector<BackendRegisterInfo*> insertionOrderedCatalogue;
152  };
153 
154  /********************************************************************************************************************/
155  /* Iterator class definitions **************************************************************************************/
156  /********************************************************************************************************************/
157 
176  template<typename BackendRegisterInfo>
177  class const_BackendRegisterCatalogueImplIterator : public const_RegisterCatalogueImplIterator {
178  public:
179  explicit const_BackendRegisterCatalogueImplIterator(typename std::vector<BackendRegisterInfo*>::const_iterator it);
180 
181  void increment() override;
182 
183  void decrement() override;
184 
185  const BackendRegisterInfoBase* get() override;
186 
187  [[nodiscard]] bool isEqual(
188  const std::unique_ptr<const_RegisterCatalogueImplIterator>& rightHandSide) const override;
189 
190  [[nodiscard]] std::unique_ptr<const_RegisterCatalogueImplIterator> clone() const override;
191 
193 
195 
197 
199 
200  const BackendRegisterInfo& operator*() const;
201 
202  const BackendRegisterInfo* operator->() const;
203 
204  explicit operator RegisterCatalogue::const_iterator() const;
205 
206  bool operator==(const const_BackendRegisterCatalogueImplIterator& rightHandSide) const;
207 
208  bool operator!=(const const_BackendRegisterCatalogueImplIterator& rightHandSide) const;
209 
210  protected:
211  typename std::vector<BackendRegisterInfo*>::const_iterator theIterator;
212  };
213 
214  /********************************************************************************************************************/
215 
217  template<typename BackendRegisterInfo>
219  public:
221 
222  explicit BackendRegisterCatalogueImplIterator(typename std::vector<BackendRegisterInfo*>::iterator theIterator_);
223 
225 
227 
229 
231 
232  BackendRegisterInfo& operator*() const;
233 
234  BackendRegisterInfo* operator->() const;
235 
236  explicit operator RegisterCatalogue::const_iterator() const;
237 
238  bool operator==(const BackendRegisterCatalogueImplIterator& rightHandSide) const;
239 
240  bool operator!=(const BackendRegisterCatalogueImplIterator& rightHandSide) const;
241 
242  protected:
243  typename std::vector<BackendRegisterInfo*>::iterator theIterator;
244  };
245 
246  /********************************************************************************************************************/
247  /********************************************************************************************************************/
248 
249  /********************************************************************************************************************/
250  /* Register catalogue container implementations ********************************************************************/
251  /********************************************************************************************************************/
252 
253  template<typename BackendRegisterInfo>
255  return RegisterInfo(std::make_unique<BackendRegisterInfo>(getBackendRegister(name)));
256  }
257 
258  /********************************************************************************************************************/
259 
260  template<typename BackendRegisterInfo>
262  const RegisterPath& name) const {
263  try {
264  return catalogue.at(name);
265  }
266  catch(std::out_of_range&) {
267  throw ChimeraTK::logic_error("BackendRegisterCatalogue::getRegister(): Register '" + name + "' does not exist.");
268  }
269  }
270 
271  /********************************************************************************************************************/
272 
273  template<typename BackendRegisterInfo>
275  return catalogue.find(registerPathName) != catalogue.end();
276  }
277 
278  /********************************************************************************************************************/
279 
280  template<typename BackendRegisterInfo>
282  return catalogue.size();
283  }
284 
285  /********************************************************************************************************************/
286 
287  template<typename BackendRegisterInfo>
288  std::unique_ptr<const_RegisterCatalogueImplIterator> BackendRegisterCatalogue<
289  BackendRegisterInfo>::getConstIteratorBegin() const {
290  auto it = std::make_unique<const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>>(
291  insertionOrderedCatalogue.cbegin());
292  return it;
293  }
294 
295  /********************************************************************************************************************/
296 
297  template<typename BackendRegisterInfo>
298  std::unique_ptr<const_RegisterCatalogueImplIterator> BackendRegisterCatalogue<
299  BackendRegisterInfo>::getConstIteratorEnd() const {
300  auto it = std::make_unique<const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>>(
301  insertionOrderedCatalogue.cend());
302  return it;
303  }
304 
305  /********************************************************************************************************************/
306 
307  template<typename BackendRegisterInfo>
308  std::unique_ptr<BackendRegisterCatalogueBase> BackendRegisterCatalogue<BackendRegisterInfo>::clone() const {
309  // FIXME: Change BackendRegisterCatalogue to CRTP, i.e. it has the DERRIVED class as template parameter.
310  // Like this the correct catalogue type is already created here and inherriting backends can call this clone,
311  // then cast to the actual type and fill the rest of it's properties. Would get rid of the "fillFromThis()"
312  // workaround and safe clone() implementations in case no data members are added.
313 
314  // Create a new instance of a BackendRegisterCatalogue with the correct type.
315  // Inheriting backends will create the derrived type here.
316  std::unique_ptr<BackendRegisterCatalogueBase> c = std::make_unique<BackendRegisterCatalogue<BackendRegisterInfo>>();
317  // Fill the contents of the BackendRegisterCatalogue base class into the target c. This is accessing the
318  // private variables and ensures consistency.
319  fillFromThis(dynamic_cast<BackendRegisterCatalogue<BackendRegisterInfo>*>(c.get()));
320  // Derrived backends will copy/clone their additional data members here, before
321  // returning the unique_ptr. The compiler will return it via copy elision.
322  return c;
323  }
324 
325  /********************************************************************************************************************/
326 
327  template<typename BackendRegisterInfo>
330  // FIXME: change this to a single loop which is just filling the new catalogue through the public API
331  for(auto& p : catalogue) {
332  target->catalogue[p.first] = getBackendRegister(p.first);
333  }
334  for(auto& ptr : insertionOrderedCatalogue) {
335  target->insertionOrderedCatalogue.push_back(&target->catalogue[ptr->getRegisterName()]);
336  }
337  }
338 
339  /********************************************************************************************************************/
340 
341  template<typename BackendRegisterInfo>
342  void BackendRegisterCatalogue<BackendRegisterInfo>::addRegister(const BackendRegisterInfo& registerInfo) {
343  if(hasRegister(registerInfo.getRegisterName())) {
344  throw ChimeraTK::logic_error("BackendRegisterCatalogue::addRegister(): Register with the name " +
345  registerInfo.getRegisterName() + " already exists!");
346  }
347  catalogue[registerInfo.getRegisterName()] = registerInfo;
348  insertionOrderedCatalogue.push_back(&catalogue[registerInfo.getRegisterName()]);
349  }
350 
351  /********************************************************************************************************************/
352 
353  template<typename BackendRegisterInfo>
355  // check existence
356  if(!hasRegister(name)) {
358  "BackendRegisterCatalogue::removeRegister(): Register '" + name + "' does not exist.");
359  }
360 
361  // remove from insertion-ordered vector
362  auto it = std::find_if(insertionOrderedCatalogue.begin(), insertionOrderedCatalogue.end(),
363  [&](auto reg) { return reg->getRegisterName() == name; });
364  assert(it != insertionOrderedCatalogue.end());
365  insertionOrderedCatalogue.erase(it);
366 
367  // remove from catalogue map
368  auto removed = catalogue.erase(name);
369  assert(removed == 1);
370  }
371 
372  /********************************************************************************************************************/
373 
374  template<typename BackendRegisterInfo>
375  void BackendRegisterCatalogue<BackendRegisterInfo>::modifyRegister(const BackendRegisterInfo& registerInfo) {
376  if(!hasRegister(registerInfo.getRegisterName())) {
377  throw ChimeraTK::logic_error("BackendRegisterCatalogue::modifyRegister(): Register '" +
378  registerInfo.getRegisterName() + "' cannot be modified because it does not exist!");
379  }
380  catalogue[registerInfo.getRegisterName()] = registerInfo;
381  // We don't have to touch the insertionOrderedCatalogue because is stores references, and this has not changed.
382  }
383 
384  /********************************************************************************************************************/
385  /* Iterator implementations ****************************************************************************************/
386  /********************************************************************************************************************/
387 
388  template<typename BackendRegisterInfo>
390  typename std::vector<BackendRegisterInfo*>::const_iterator it)
391  : theIterator(it) {}
392 
393  /********************************************************************************************************************/
394 
395  template<typename BackendRegisterInfo>
397  ++theIterator;
398  }
399 
400  /********************************************************************************************************************/
401 
402  template<typename BackendRegisterInfo>
404  --theIterator;
405  }
406 
407  /********************************************************************************************************************/
408 
409  template<typename BackendRegisterInfo>
411  return *theIterator;
412  }
413 
414  /********************************************************************************************************************/
415 
416  template<typename BackendRegisterInfo>
418  const std::unique_ptr<const_RegisterCatalogueImplIterator>& rightHandSide) const {
419  auto rhs_casted = dynamic_cast<const_BackendRegisterCatalogueImplIterator*>(rightHandSide.get());
420  return rhs_casted && rhs_casted->theIterator == theIterator;
421  }
422 
423  /********************************************************************************************************************/
424 
425  template<typename BackendRegisterInfo>
426  std::unique_ptr<const_RegisterCatalogueImplIterator> const_BackendRegisterCatalogueImplIterator<
427  BackendRegisterInfo>::clone() const {
428  return {std::make_unique<const_BackendRegisterCatalogueImplIterator>(*this)};
429  }
430 
431  /********************************************************************************************************************/
432 
433  template<typename BackendRegisterInfo>
435  BackendRegisterInfo>::operator++() {
436  ++theIterator;
437  return *this;
438  }
439 
440  /********************************************************************************************************************/
441 
442  template<typename BackendRegisterInfo>
444  BackendRegisterInfo>::operator++(int) {
446  ++theIterator;
447  return temp;
448  }
449 
450  /********************************************************************************************************************/
451 
452  template<typename BackendRegisterInfo>
454  BackendRegisterInfo>::operator--() {
455  --theIterator;
456  return *this;
457  }
458 
459  /********************************************************************************************************************/
460 
461  template<typename BackendRegisterInfo>
463  BackendRegisterInfo>::operator--(int) {
465  --theIterator;
466  return temp;
467  }
468 
469  /********************************************************************************************************************/
470 
471  template<typename BackendRegisterInfo>
473  return *(*theIterator);
474  }
475 
476  /********************************************************************************************************************/
477 
478  template<typename BackendRegisterInfo>
480  return *theIterator;
481  }
482 
483  /********************************************************************************************************************/
484 
485  template<typename BackendRegisterInfo>
487  const const_BackendRegisterCatalogueImplIterator& rightHandSide) const {
488  return rightHandSide.theIterator == theIterator;
489  }
490 
491  /********************************************************************************************************************/
492 
493  template<typename BackendRegisterInfo>
495  const const_BackendRegisterCatalogueImplIterator& rightHandSide) const {
496  return rightHandSide.theIterator != theIterator;
497  }
498 
499  /********************************************************************************************************************/
500  /********************************************************************************************************************/
501 
502  template<typename BackendRegisterInfo>
504  typename std::vector<BackendRegisterInfo*>::iterator theIterator_)
505  : theIterator(theIterator_) {}
506 
507  /********************************************************************************************************************/
508 
509  template<typename BackendRegisterInfo>
511  BackendRegisterInfo>::operator++() {
512  ++theIterator;
513  return *this;
514  }
515 
516  /********************************************************************************************************************/
517 
518  template<typename BackendRegisterInfo>
520  BackendRegisterInfo>::operator++(int) {
522  ++theIterator;
523  return temp;
524  }
525 
526  /********************************************************************************************************************/
527 
528  template<typename BackendRegisterInfo>
530  BackendRegisterInfo>::operator--() {
531  --theIterator;
532  return *this;
533  }
534 
535  /********************************************************************************************************************/
536 
537  template<typename BackendRegisterInfo>
539  BackendRegisterInfo>::operator--(int) {
541  --theIterator;
542  return temp;
543  }
544 
545  /********************************************************************************************************************/
546 
547  template<typename BackendRegisterInfo>
549  return *(*theIterator);
550  }
551 
552  /********************************************************************************************************************/
553 
554  template<typename BackendRegisterInfo>
556  return *theIterator;
557  }
558 
559  /********************************************************************************************************************/
560 
561  template<typename BackendRegisterInfo>
564  boost::make_shared<const_BackendRegisterCatalogueImplIterator<BackendRegisterInfo>>(theIterator)};
565  }
566 
567  /********************************************************************************************************************/
568 
569  template<typename BackendRegisterInfo>
571  const BackendRegisterCatalogueImplIterator& rightHandSide) const {
572  return rightHandSide.theIterator == theIterator;
573  }
574 
575  /********************************************************************************************************************/
576 
577  template<typename BackendRegisterInfo>
579  const BackendRegisterCatalogueImplIterator& rightHandSide) const {
580  return rightHandSide.theIterator != theIterator;
581  }
582 
583  /********************************************************************************************************************/
584 
585 } // namespace ChimeraTK
ChimeraTK::BackendRegisterCatalogueBase::operator=
BackendRegisterCatalogueBase & operator=(BackendRegisterCatalogueBase &&other)=default
ChimeraTK::RegisterCatalogue::const_iterator
Const iterator for iterating through the registers in the catalogue.
Definition: RegisterCatalogue.h:51
ChimeraTK::BackendRegisterCatalogueBase::getConstIteratorEnd
virtual std::unique_ptr< const_RegisterCatalogueImplIterator > getConstIteratorEnd() const =0
Return end iterator for iterating through the registers in the catalogue.
ChimeraTK::BackendRegisterCatalogueBase::getNumberOfRegisters
virtual size_t getNumberOfRegisters() const =0
Get number of registers in the catalogue.
ChimeraTK::BackendRegisterCatalogue::end
const_BackendRegisterCatalogueImplIterator< BackendRegisterInfo > end() const
Return const end iterators for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:127
ChimeraTK::const_BackendRegisterCatalogueImplIterator::theIterator
std::vector< BackendRegisterInfo * >::const_iterator theIterator
Definition: BackendRegisterCatalogue.h:211
ChimeraTK::const_BackendRegisterCatalogueImplIterator::operator->
const BackendRegisterInfo * operator->() const
Definition: BackendRegisterCatalogue.h:479
ChimeraTK::BackendRegisterCatalogueImplIterator::operator--
BackendRegisterCatalogueImplIterator & operator--()
Definition: BackendRegisterCatalogue.h:530
ChimeraTK::BackendRegisterCatalogue::cbegin
const_BackendRegisterCatalogueImplIterator< BackendRegisterInfo > cbegin() const
Return const begin iterators for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:132
ChimeraTK::BackendRegisterCatalogue::end
BackendRegisterCatalogueImplIterator< BackendRegisterInfo > end()
Return end iterator for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:117
ChimeraTK::BackendRegisterCatalogue::modifyRegister
void modifyRegister(const BackendRegisterInfo &registerInfo)
Replaces the register information for the matching register.
Definition: BackendRegisterCatalogue.h:375
ChimeraTK::const_BackendRegisterCatalogueImplIterator::operator*
const BackendRegisterInfo & operator*() const
Definition: BackendRegisterCatalogue.h:472
ChimeraTK::BackendRegisterCatalogueImplIterator::operator==
bool operator==(const BackendRegisterCatalogueImplIterator &rightHandSide) const
Definition: BackendRegisterCatalogue.h:570
ChimeraTK::BackendRegisterCatalogue::clone
std::unique_ptr< BackendRegisterCatalogueBase > clone() const override
Create deep copy of the catalogue.
Definition: BackendRegisterCatalogue.h:308
ChimeraTK::const_BackendRegisterCatalogueImplIterator::decrement
void decrement() override
Definition: BackendRegisterCatalogue.h:403
ChimeraTK::BackendRegisterCatalogueImplIterator::operator*
BackendRegisterInfo & operator*() const
Definition: BackendRegisterCatalogue.h:548
ChimeraTK::const_BackendRegisterCatalogueImplIterator::const_BackendRegisterCatalogueImplIterator
const_BackendRegisterCatalogueImplIterator(typename std::vector< BackendRegisterInfo * >::const_iterator it)
Definition: BackendRegisterCatalogue.h:389
ChimeraTK::BackendRegisterCatalogueBase::BackendRegisterCatalogueBase
BackendRegisterCatalogueBase()=default
ChimeraTK::const_BackendRegisterCatalogueImplIterator::operator==
bool operator==(const const_BackendRegisterCatalogueImplIterator &rightHandSide) const
Definition: BackendRegisterCatalogue.h:486
ChimeraTK::BackendRegisterCatalogueBase::getRegister
virtual RegisterInfo getRegister(const RegisterPath &registerPathName) const =0
Get register information for a given full path name.
ChimeraTK::BackendRegisterCatalogueImplIterator::theIterator
std::vector< BackendRegisterInfo * >::iterator theIterator
Definition: BackendRegisterCatalogue.h:243
ChimeraTK::BackendRegisterCatalogue
Interface for backends to the register catalogue.
Definition: BackendRegisterCatalogue.h:70
ChimeraTK::BackendRegisterCatalogueImplIterator::operator->
BackendRegisterInfo * operator->() const
Definition: BackendRegisterCatalogue.h:555
ChimeraTK::BackendRegisterCatalogueBase::hasRegister
virtual bool hasRegister(const RegisterPath &registerPathName) const =0
Check if register with the given path name exists.
ChimeraTK::BackendRegisterCatalogue::getConstIteratorEnd
std::unique_ptr< const_RegisterCatalogueImplIterator > getConstIteratorEnd() const override
Return end iterator for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:299
ChimeraTK::BackendRegisterCatalogueImplIterator::BackendRegisterCatalogueImplIterator
BackendRegisterCatalogueImplIterator()=default
ChimeraTK::const_BackendRegisterCatalogueImplIterator::operator!=
bool operator!=(const const_BackendRegisterCatalogueImplIterator &rightHandSide) const
Definition: BackendRegisterCatalogue.h:494
ChimeraTK::RegisterInfo
Definition: RegisterInfo.h:12
ChimeraTK::const_BackendRegisterCatalogueImplIterator::operator++
const_BackendRegisterCatalogueImplIterator & operator++()
Definition: BackendRegisterCatalogue.h:435
ChimeraTK::BackendRegisterCatalogue::addRegister
void addRegister(const BackendRegisterInfo &registerInfo)
Add register information to the catalogue.
Definition: BackendRegisterCatalogue.h:342
ChimeraTK::BackendRegisterCatalogueImplIterator
Non-const iterator for iterating through the registers in the catalogue, used by backend implementati...
Definition: BackendRegisterCatalogue.h:15
ChimeraTK::BackendRegisterCatalogue::getRegister
RegisterInfo getRegister(const RegisterPath &registerPathName) const final
Note: Implementation internally uses getBackendRegister(), so no need to override.
Definition: BackendRegisterCatalogue.h:254
RegisterCatalogue.h
ChimeraTK::BackendRegisterCatalogue::begin
const_BackendRegisterCatalogueImplIterator< BackendRegisterInfo > begin() const
Return const begin iterators for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:122
ChimeraTK::BackendRegisterCatalogue::getConstIteratorBegin
std::unique_ptr< const_RegisterCatalogueImplIterator > getConstIteratorBegin() const override
Return begin iterator for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:289
ChimeraTK::BackendRegisterCatalogue::cend
const_BackendRegisterCatalogueImplIterator< BackendRegisterInfo > cend() const
Return const end iterators for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:137
ChimeraTK::BackendRegisterCatalogueBase::clone
virtual std::unique_ptr< BackendRegisterCatalogueBase > clone() const =0
Create deep copy of the catalogue.
ChimeraTK::BackendRegisterCatalogue::fillFromThis
void fillFromThis(BackendRegisterCatalogue< BackendRegisterInfo > *target) const
Helper function for clone functions.
Definition: BackendRegisterCatalogue.h:328
ChimeraTK::const_BackendRegisterCatalogueImplIterator::clone
std::unique_ptr< const_RegisterCatalogueImplIterator > clone() const override
Definition: BackendRegisterCatalogue.h:427
ChimeraTK::BackendRegisterCatalogueBase::~BackendRegisterCatalogueBase
virtual ~BackendRegisterCatalogueBase()=default
ChimeraTK::BackendRegisterCatalogue::removeRegister
void removeRegister(const RegisterPath &name)
Remove register as identified by the given name from the catalogue.
Definition: BackendRegisterCatalogue.h:354
ChimeraTK::RegisterPath
Class to store a register path name.
Definition: RegisterPath.h:16
ChimeraTK::BackendRegisterCatalogue::hasRegister
bool hasRegister(const RegisterPath &registerPathName) const override
Check if register with the given path name exists.
Definition: BackendRegisterCatalogue.h:274
ChimeraTK::BackendRegisterCatalogue::getBackendRegister
virtual BackendRegisterInfo getBackendRegister(const RegisterPath &registerPathName) const
Note: Override this function if backend has "hidden" registers which are not added to the map and hen...
Definition: BackendRegisterCatalogue.h:261
ChimeraTK::const_BackendRegisterCatalogueImplIterator::increment
void increment() override
Definition: BackendRegisterCatalogue.h:396
ChimeraTK::const_BackendRegisterCatalogueImplIterator
Implementation of the catalogue const iterator which is templated to the actual BackendRegisterInfo i...
Definition: BackendRegisterCatalogue.h:12
ChimeraTK
Definition: DummyBackend.h:16
ChimeraTK::BackendRegisterInfoBase
DeviceBackend-independent register description.
Definition: BackendRegisterInfoBase.h:16
ChimeraTK::const_BackendRegisterCatalogueImplIterator::operator--
const_BackendRegisterCatalogueImplIterator & operator--()
Definition: BackendRegisterCatalogue.h:454
ChimeraTK::const_BackendRegisterCatalogueImplIterator::isEqual
bool isEqual(const std::unique_ptr< const_RegisterCatalogueImplIterator > &rightHandSide) const override
Definition: BackendRegisterCatalogue.h:417
ChimeraTK::BackendRegisterCatalogueBase::getConstIteratorBegin
virtual std::unique_ptr< const_RegisterCatalogueImplIterator > getConstIteratorBegin() const =0
Return begin iterator for iterating through the registers in the catalogue.
ChimeraTK::BackendRegisterCatalogue::getNumberOfRegisters
size_t getNumberOfRegisters() const override
Get number of registers in the catalogue.
Definition: BackendRegisterCatalogue.h:281
ChimeraTK::const_BackendRegisterCatalogueImplIterator::get
const BackendRegisterInfoBase * get() override
Definition: BackendRegisterCatalogue.h:410
ChimeraTK::logic_error
Exception thrown when a logic error has occured.
Definition: Exception.h:51
ChimeraTK::BackendRegisterCatalogueBase
Pure virtual implementation base class for the register catalogue.
Definition: BackendRegisterCatalogue.h:22
ChimeraTK::BackendRegisterCatalogueImplIterator::operator++
BackendRegisterCatalogueImplIterator & operator++()
Definition: BackendRegisterCatalogue.h:511
ChimeraTK::BackendRegisterCatalogue::begin
BackendRegisterCatalogueImplIterator< BackendRegisterInfo > begin()
Return begin iterator for iterating through the registers in the catalogue.
Definition: BackendRegisterCatalogue.h:112
ChimeraTK::BackendRegisterCatalogueImplIterator::operator!=
bool operator!=(const BackendRegisterCatalogueImplIterator &rightHandSide) const
Definition: BackendRegisterCatalogue.h:578