MRPT  1.9.9
CAction.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "obs-precomp.h" // Precompiled headers
11 
12 #include <mrpt/obs/CAction.h>
14 #include <iomanip>
15 #include <iostream>
16 #include <sstream>
17 
18 using namespace mrpt::obs;
19 
21 
22 void CAction::getDescriptionAsText(std::ostream& o) const
23 {
24  using namespace mrpt::system; // for the TTimeStamp << op
25 
26  o << "Timestamp (UTC): " << mrpt::system::dateTimeToString(timestamp)
27  << std::endl;
28  o << " (as time_t): " << std::fixed << std::setprecision(5)
29  << mrpt::system::timestampTotime_t(timestamp) << std::endl;
30  o << " (as TTimestamp): " << timestamp << std::endl;
31  o << std::endl;
32 }
33 
35 {
36  std::stringstream ss;
38  return ss.str();
39 }
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE(class_name, base_class, NS)
This must be inserted as implementation of some required members for virtual CSerializable classes: ...
STL namespace.
double timestampTotime_t(const mrpt::system::TTimeStamp t) noexcept
Transform from TTimeStamp to standard "time_t" (actually a double number, it can contain fractions of...
Definition: datetime.h:105
This namespace contains representation of robot actions and observations.
GLsizei const GLchar ** string
Definition: glext.h:4116
Declares a class for storing a robot action.
Definition: CAction.h:24
std::string dateTimeToString(const mrpt::system::TTimeStamp t)
Convert a timestamp into this textual form (UTC time): YEAR/MONTH/DAY,HH:MM:SS.MMM.
Definition: datetime.cpp:154
virtual void getDescriptionAsText(std::ostream &o) const
Build a detailed, multi-line textual description of the action contents and dump it to the output str...
Definition: CAction.cpp:22
std::string getDescriptionAsTextValue() const
Return by value version of getDescriptionAsText(std::ostream&)
Definition: CAction.cpp:34
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 45d659fbb Tue Dec 10 18:21:14 2019 +0100 at mar dic 10 18:30:09 CET 2019