MRPT  1.9.9
messagelocation.h
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 #ifndef MESSAGELOCATION_H
10 #define MESSAGELOCATION_H
11 
12 /*! \brief Stores the location of a message in a buffer using a start position
13  * and a size
14  */
16 {
17  public:
18  /** The offset of the first byte of the message or -1 if no message */
20  /** The size of the message, when less than 0 it indicates the expected
21  * message size */
22  int m_size;
23 
24  /*! \brief Constructor, initializes by default to an invalid message
25  \param start The offset of the first byte of the message
26  \param size The size of the message
27  \sa isValid() \sa m_startPos \sa m_size \sa
28  IProtocolHandler::findMessage
29  */
30  MessageLocation(int start = -1, int size = 0)
32  {
33  }
34 
35  /*! \brief Returns whether the stored message information describes a valid
36  * message
37  */
38  inline bool isValid() const { return m_startPos >= 0 && m_size > 0; }
39 };
40 
41 #endif // file guard
MessageLocation(int start=-1, int size=0)
Constructor, initializes by default to an invalid message.
Stores the location of a message in a buffer using a start position and a size.
int m_startPos
The offset of the first byte of the message or -1 if no message.
int m_size
The size of the message, when less than 0 it indicates the expected message size. ...
GLsizeiptr size
Definition: glext.h:3934
GLuint start
Definition: glext.h:3532
bool isValid() const
Returns whether the stored message information describes a valid message.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019