OSVR-Core
MessageType.h
Go to the documentation of this file.
1 
11 // Copyright 2014 Sensics, Inc.
12 //
13 // Licensed under the Apache License, Version 2.0 (the "License");
14 // you may not use this file except in compliance with the License.
15 // You may obtain a copy of the License at
16 //
17 // http://www.apache.org/licenses/LICENSE-2.0
18 //
19 // Unless required by applicable law or agreed to in writing, software
20 // distributed under the License is distributed on an "AS IS" BASIS,
21 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 // See the License for the specific language governing permissions and
23 // limitations under the License.
24 
25 #ifndef INCLUDED_MessageType_h_GUID_61B56482_02E5_47B5_8CFA_EAF4286F309F
26 #define INCLUDED_MessageType_h_GUID_61B56482_02E5_47B5_8CFA_EAF4286F309F
27 
28 // Internal Includes
30 
31 // Library/third-party includes
32 #include <boost/noncopyable.hpp>
33 
34 // Standard includes
35 #include <string>
36 
38 struct OSVR_MessageTypeObject : boost::noncopyable {
39  public:
41  virtual ~OSVR_MessageTypeObject();
42 
44  std::string const &getName() const;
45 
46  protected:
48  OSVR_MessageTypeObject(std::string const &name);
49 
50  private:
51  std::string const m_name;
52 };
53 #endif // INCLUDED_MessageType_h_GUID_61B56482_02E5_47B5_8CFA_EAF4286F309F
Header forward declaring MessageType and specifying a smart pointer.
Base class for connection-specific message type registration.
Definition: MessageType.h:38
std::string const & getName() const
accessor for message name
Definition: MessageType.cpp:36
virtual ~OSVR_MessageTypeObject()
destructor
Definition: MessageType.cpp:34
OSVR_MessageTypeObject(std::string const &name)
Constructor for use by derived classes only.
Definition: MessageType.cpp:38