DataFieldIdentifier.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarX::Core
19 * @author Kai Welke (welke _at_ kit _dot_ edu)
20 * @date 2011 Kai Welke
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24 
25 #pragma once
26 
28 #include <ArmarXCore/interface/observers/DataFieldIdentifierBase.h>
29 
30 #include <string>
31 #include <ostream>
32 
33 namespace armarx
34 {
35  class DataFieldIdentifier;
40 
49  virtual public DataFieldIdentifierBase
50  {
51  public:
56 
62  DataFieldIdentifier(std::string dataFieldIdentifierStr);
63 
71  DataFieldIdentifier(std::string observerName, std::string channelName, std::string datafieldName);
72 
78  std::string getIdentifierStr() const;
79 
86  bool equals(const DataFieldIdentifier& dataFieldIdentifier);
87 
94  bool beginsWith(const DataFieldIdentifier& dataFieldIdentifier);
95 
101  std::string getObserverName() const
102  {
103  return observerName;
104  }
105 
111  std::string getChannelName() const
112  {
113  return channelName;
114  }
115 
121  std::string getDataFieldName() const
122  {
123  return datafieldName;
124  }
125 
129  friend std::ostream& operator<<(std::ostream& stream, const DataFieldIdentifier& rhs)
130  {
131  stream << rhs.getIdentifierStr();
132  return stream;
133  }
134 
138  friend std::ostream& operator<<(std::ostream& stream, const DataFieldIdentifierPtr& rhs)
139  {
140  stream << rhs->getIdentifierStr();
141  return stream;
142  }
143  };
144 }
145 extern template class ::IceInternal::Handle< ::armarx::DataFieldIdentifier>;
146 
armarx::DataFieldIdentifier::getObserverName
std::string getObserverName() const
Retrieve observer name.
Definition: DataFieldIdentifier.h:101
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::DataFieldIdentifier::getChannelName
std::string getChannelName() const
Retrieve channel name.
Definition: DataFieldIdentifier.h:111
armarx::DataFieldIdentifier::getDataFieldName
std::string getDataFieldName() const
Retrieve datafield name.
Definition: DataFieldIdentifier.h:121
armarx::DataFieldIdentifier::getIdentifierStr
std::string getIdentifierStr() const
Retrieve data field identifier string.
Definition: DataFieldIdentifier.cpp:56
armarx::DataFieldIdentifier::DataFieldIdentifier
DataFieldIdentifier()
Creates an empty DataFieldIdentifier.
Definition: DataFieldIdentifier.h:55
armarx::DataFieldIdentifier::operator<<
friend std::ostream & operator<<(std::ostream &stream, const DataFieldIdentifier &rhs)
stream operator for DataFieldIdentifier
Definition: DataFieldIdentifier.h:129
ImportExport.h
armarx::DataFieldIdentifier::operator<<
friend std::ostream & operator<<(std::ostream &stream, const DataFieldIdentifierPtr &rhs)
stream operator for Ice shared pointer of DataFieldIdentifier
Definition: DataFieldIdentifier.h:138
ARMARXCORE_IMPORT_EXPORT
#define ARMARXCORE_IMPORT_EXPORT
Definition: ImportExport.h:38
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::DataFieldIdentifier
DataFieldIdentifier provide the basis to identify data field within a distributed ArmarX scenario.
Definition: DataFieldIdentifier.h:48