/usr/include/urg/ConnectionUtils.h is in liburg0-dev 0.8.12-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | #ifndef QRK_CONNECTION_UTILS_H
#define QRK_CONNECTION_UTILS_H
/*!
\file
\brief Connection ��p�����⏕��
\author Satofumi KAMIMURA
$Id: ConnectionUtils.h 1838 2010-06-01 03:17:17Z satofumi $
*/
#include <cstddef>
#include <algorithm>
//! Quick Robot Develoment Kit.
namespace qrk
{
class Connection;
/*!
\brief ���s�R�[�h����Ԃ�
\retval true LF, CR �̂Ƃ�
\retval false ��L�ȊO�̂Ƃ�
*/
extern bool isLF(const char ch);
/*!
\brief ��M�f�[�^��ǂݔ��
Connection::clear() �Ƃ́A�^�C���A�E�g���Ԃ��w�肵�ēǂݔ����_���قȂ�
\param[in,out] con �ʐM���\�[�X
\param[in] total_timeout �^�C���A�E�g���Ԃ̏�� [msec]
\param[in] each_timeout ��M�f�[�^�Ԃɂ�����^�C���A�E�g���Ԃ̏�� [msec]
*/
extern void skip(Connection* con, int total_timeout, int each_timeout = 0);
/*!
\brief ���s�܂ł̃f�[�^�ǂݏo��
������I�[�� \\0 ��t�����ĕԂ�
\param[in,out] con �ʐM���\�[�X
\param[out] buf ��M�o�b�t�@
\param[in] count ��M�o�b�t�@�̍ő�T�C�Y
\param[in] timeout �^�C���A�E�g [msec]
\return ��M������ (��M���Ȃ��ă^�C���A�E�g�����ꍇ�� -1)
*/
extern int readline(Connection* con, char* buf, const size_t count,
int timeout);
/*!
\brief �ڑ��I�u�W�F�N�g�̌���
a �� b �̐ڑ��I�u�W�F�N�g����������B
*/
template <class T>
void swapConnection(T& a, T& b)
{
Connection* t = a.connection();
a.setConnection(b.connection());
b.setConnection(t);
}
}
#endif /* !QRK_CONNECTION_UTILS_H */
|