The Gaudi Framework  v30r3 (a5ef0a68)
PropertyName.h
Go to the documentation of this file.
1 #ifndef JOBOPTIONSVC_PROPERTY_NAME_H_
2 #define JOBOPTIONSVC_PROPERTY_NAME_H_
3 // ============================================================================
4 // Includes:
5 // ============================================================================
6 // STD & STL:
7 // ============================================================================
8 #include "Position.h"
9 #include <string>
10 // ============================================================================
11 namespace Gaudi
12 {
13  namespace Parsers
14  {
15  // ============================================================================
16  class Position;
17  // ============================================================================
18  class PropertyName final
19  {
20  public:
21  // ----------------------------------------------------------------------------
22  explicit PropertyName( std::string property ) : property_( std::move( property ) ) {}
23  PropertyName( std::string property, const Position& pos ) : property_( std::move( property ) ), position_( pos )
24  {
25  }
27  : client_( std::move( client ) ), property_( std::move( property ) )
28  {
29  }
31  : client_( std::move( client ) ), property_( std::move( property ) ), position_( std::move( pos ) )
32  {
33  }
34  const std::string& client() const { return client_; }
35  const std::string& property() const { return property_; }
36  const Position& position() const { return position_; }
37  std::string FullName() const;
38  std::string ToString() const;
39  bool HasClient() const { return !client_.empty(); }
40  bool HasPosition() const { return position_.Exists(); }
41 
42  private:
46  };
47  // ============================================================================
48  } /* Gaudi */
49 } /* Parsers */
50 // ============================================================================
51 #endif // JOBOPTIONSVC_PROPERTY_NAME_H_
const std::string & property() const
Definition: PropertyName.h:35
T empty(T...args)
std::string ToString() const
Definition: PropertyName.cpp:8
const Position & position() const
Definition: PropertyName.h:36
PropertyName(std::string client, std::string property, Position pos)
Definition: PropertyName.h:30
STL namespace.
const std::string & client() const
Definition: PropertyName.h:34
STL class.
std::string FullName() const
Definition: PropertyName.cpp:6
PropertyName(std::string property, const Position &pos)
Definition: PropertyName.h:23
PropertyName(std::string client, std::string property)
Definition: PropertyName.h:26
bool Exists() const
Definition: Position.h:28
PropertyName(std::string property)
Definition: PropertyName.h:22
Helper functions to set/get the application return code.
Definition: __init__.py:1