All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
PropertyName.h
Go to the documentation of this file.
1 // $Id:$
2 #ifndef JOBOPTIONSVC_PROPERTY_NAME_H_
3 #define JOBOPTIONSVC_PROPERTY_NAME_H_
4 // ============================================================================
5 // Includes:
6 // ============================================================================
7 // STD & STL:
8 // ============================================================================
9 #include <string>
10 // ============================================================================
11 // Boost:
12 // ============================================================================
13 #include <boost/scoped_ptr.hpp>
14 // ============================================================================
15 #include "Position.h"
16 // ============================================================================
17 namespace Gaudi { namespace Parsers {
18 // ============================================================================
19 class Position;
20 // ============================================================================
21 class PropertyName {
22  public:
23 // ----------------------------------------------------------------------------
24  typedef boost::scoped_ptr<PropertyName> ScopedPtr;
25  typedef boost::scoped_ptr<const PropertyName> ConstScopedPtr;
26 // ----------------------------------------------------------------------------
27  explicit PropertyName(const std::string& property): client_(""),
28  property_(property) {}
29  PropertyName(const std::string& property, const Position& pos):
30  client_(""), property_(property), position_(pos) {}
31  PropertyName(const std::string& client, const std::string& property):
32  client_(client), property_(property){}
33  PropertyName(const std::string& client, const std::string& property,
34  const Position& pos):
35  client_(client), property_(property), position_(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_.length() > 0;}
42  bool HasPosition() const { return position_.Exists();}
43  private:
44  std::string client_;
45  std::string property_;
47 };
48 // ============================================================================
49 } /* Gaudi */ } /* Parsers */
50 // ============================================================================
51 #endif // JOBOPTIONSVC_PROPERTY_NAME_H_
const std::string & property() const
Definition: PropertyName.h:37
std::string ToString() const
const Position & position() const
Definition: PropertyName.h:38
boost::scoped_ptr< PropertyName > ScopedPtr
Definition: PropertyName.h:24
PropertyName(const std::string &client, const std::string &property)
Definition: PropertyName.h:31
const std::string & client() const
Definition: PropertyName.h:36
std::string FullName() const
bool Exists() const
Definition: Position.h:23
PropertyName(const std::string &property, const Position &pos)
Definition: PropertyName.h:29
boost::scoped_ptr< const PropertyName > ConstScopedPtr
Definition: PropertyName.h:25
This is a number of static methods for bootstrapping the Gaudi framework.
Definition: Bootstrap.h:14
PropertyName(const std::string &client, const std::string &property, const Position &pos)
Definition: PropertyName.h:33
PropertyName(const std::string &property)
Definition: PropertyName.h:27