sizedwriter.h
来自「一个语言识别引擎」· C头文件 代码 · 共 45 行
H
45 行
// -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
/*
* Copyright (C) 2006 Paul Fitzpatrick
* CopyPolicy: Released under the terms of the GNU GPL v2.0.
*
*/
#ifndef _YARP2_SIZEDWRITER_
#define _YARP2_SIZEDWRITER_
#include <yarp/OutputStream.h>
#include <yarp/os/PortReader.h>
namespace yarp {
class SizedWriter;
using os::PortReader;
}
/**
* Minimal requirements for an efficient Writer.
* Some protocols require knowing the size of a message up front.
* In general, that requires generating the message before sending
* it, but a user could do something more clever. The
* SizedWriter class is referenced by the library instead of
* BufferedConnectionWriter specifically to leave that possibility open.
*/
class yarp::SizedWriter {
public:
virtual ~SizedWriter() {}
virtual void write(OutputStream& os) = 0;
virtual int length() = 0;
virtual int length(int index) = 0;
virtual const char *data(int index) = 0;
virtual PortReader *getReplyHandler() = 0;
};
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?