The Gaudi Framework  master (37c0b60a)
PropertyName.h
Go to the documentation of this file.
1 /***********************************************************************************\
2 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
3 * *
4 * This software is distributed under the terms of the Apache version 2 licence, *
5 * copied verbatim in the file "LICENSE". *
6 * *
7 * In applying this licence, CERN does not waive the privileges and immunities *
8 * granted to it by virtue of its status as an Intergovernmental Organization *
9 * or submit itself to any jurisdiction. *
10 \***********************************************************************************/
11 #ifndef JOBOPTIONSVC_PROPERTY_NAME_H_
12 #define JOBOPTIONSVC_PROPERTY_NAME_H_
13 // ============================================================================
14 // Includes:
15 // ============================================================================
16 // STD & STL:
17 // ============================================================================
18 #include "Position.h"
19 #include <string>
20 // ============================================================================
21 namespace Gaudi {
22  namespace Parsers {
23  // ============================================================================
24  class Position;
25  // ============================================================================
26  class PropertyName final {
27  public:
28  // ----------------------------------------------------------------------------
29  explicit PropertyName( std::string property ) : property_( std::move( property ) ) {}
31  : property_( std::move( property ) ), position_( pos ) {}
33  : client_( std::move( client ) ), property_( std::move( property ) ) {}
35  : client_( std::move( client ) ), property_( std::move( property ) ), position_( std::move( pos ) ) {}
36  const std::string& client() const { return client_; }
37  const std::string& property() const { return property_; }
38  const Position& position() const { return position_; }
39  std::string FullName() const;
40  std::string ToString() const;
41  bool HasClient() const { return !client_.empty(); }
42  bool HasPosition() const { return position_.Exists(); }
43 
44  private:
48  };
49  // ============================================================================
50  } // namespace Parsers
51 } // namespace Gaudi
52 // ============================================================================
53 #endif // JOBOPTIONSVC_PROPERTY_NAME_H_
Gaudi::Parsers::PropertyName::HasPosition
bool HasPosition() const
Definition: PropertyName.h:42
Gaudi::Parsers::PropertyName::PropertyName
PropertyName(std::string client, std::string property)
Definition: PropertyName.h:32
Gaudi::Parsers::PropertyName::PropertyName
PropertyName(std::string client, std::string property, Position pos)
Definition: PropertyName.h:34
std::string
STL class.
Gaudi::Parsers::PropertyName::client_
std::string client_
Definition: PropertyName.h:45
Gaudi::Parsers::Position::Exists
bool Exists() const
Definition: Position.h:33
Gaudi::Parsers::PropertyName::position
const Position & position() const
Definition: PropertyName.h:38
Gaudi::Parsers::PropertyName::client
const std::string & client() const
Definition: PropertyName.h:36
Gaudi::Parsers::PropertyName::HasClient
bool HasClient() const
Definition: PropertyName.h:41
Gaudi::Parsers::Position
Definition: Position.h:23
Gaudi::Parsers::PropertyName::ToString
std::string ToString() const
Definition: PropertyName.cpp:18
Gaudi::Parsers::PropertyName::PropertyName
PropertyName(std::string property, const Position &pos)
Definition: PropertyName.h:30
Gaudi
This file provides a Grammar for the type Gaudi::Accumulators::Axis It allows to use that type from p...
Definition: __init__.py:1
Gaudi::Parsers::PropertyName::PropertyName
PropertyName(std::string property)
Definition: PropertyName.h:29
Position.h
Gaudi::Parsers::PropertyName::position_
Position position_
Definition: PropertyName.h:47
Gaudi::Parsers::PropertyName::FullName
std::string FullName() const
Definition: PropertyName.cpp:16
std
STL namespace.
std::string::empty
T empty(T... args)
Gaudi::Parsers::PropertyName
Definition: PropertyName.h:26
Gaudi::Parsers::PropertyName::property_
std::string property_
Definition: PropertyName.h:46
Gaudi::Parsers::PropertyName::property
const std::string & property() const
Definition: PropertyName.h:37