Belle II Software  release-05-02-19
StringWrapper.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2017 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Matt Barrett *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #pragma once
12 #include <framework/datastore/RelationsObject.h>
13 #include <string>
14 
15 namespace Belle2 {
25  class StringWrapper : public RelationsObject {
26 
27  // Note: Currently all functions are simple enough to be defined in this file,
28  // so there is no separate .cc for implementations.
29 
30  public:
31 
36  StringWrapper() : m_string("") {};
37 
43  void setString(const std::string& inputstring)
44  {
45  m_string = inputstring;
46  }
47 
53  std::string getString() const
54  {
55  return m_string;
56  }
57 
58  private:
59  std::string m_string;
61  };
63 } //end namespace Belle2
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::StringWrapper::setString
void setString(const std::string &inputstring)
Set string.
Definition: StringWrapper.h:51
Belle2::StringWrapper::m_string
std::string m_string
the contained string
Definition: StringWrapper.h:67
Belle2::StringWrapper::StringWrapper
StringWrapper()
Default constructor.
Definition: StringWrapper.h:44
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::StringWrapper::getString
std::string getString() const
Get string.
Definition: StringWrapper.h:61
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443