YARP
Yet Another Robot Platform
RosHeader.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef ROSHEADER_INC
10 #define ROSHEADER_INC
11 
12 #include <string>
13 #include <map>
14 
15 class RosHeader
16 {
17 public:
18  std::map<std::string,std::string> data;
19 
20  std::string writeHeader();
21 
22  bool readHeader(const std::string& bin);
23 
24  std::string toString() const;
25 
26  static void appendInt32(char *&buf,int x);
27 
28  static void appendString(char *&buf,const std::string& str);
29 
30  static std::string showMessage(std::string s);
31 };
32 
33 #endif
RosHeader::appendInt32
static void appendInt32(char *&buf, int x)
Definition: RosHeader.cpp:20
RosHeader::readHeader
bool readHeader(const std::string &bin)
Definition: RosHeader.cpp:63
RosHeader::showMessage
static std::string showMessage(std::string s)
Definition: RosHeader.cpp:32
RosHeader::appendString
static void appendString(char *&buf, const std::string &str)
Definition: RosHeader.cpp:26
RosHeader::writeHeader
std::string writeHeader()
Definition: RosHeader.cpp:42
RosHeader::data
std::map< std::string, std::string > data
Definition: RosHeader.h:18
RosHeader::toString
std::string toString() const
Definition: RosHeader.cpp:90
RosHeader
Definition: RosHeader.h:16