portreader.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_PORTREADER_
#define _YARP2_PORTREADER_

#include <yarp/os/ConstString.h>
#include <yarp/os/ConnectionReader.h>

namespace yarp {
    namespace os {
        class PortReader;
    }
}

/**
 * Interface implemented by all objects that can read themselves from
 * the network, such as Bottle objects.
 * @see Port, PortWriter
 */
class yarp::os::PortReader {
public:

    /**
     * Destructor.
     */
    virtual ~PortReader() {}

    /**
     * Read this object from a network connection.
     * Override this for your particular class.
     * @param connection an interface to the network connection for reading
     * @return true iff the object is successfully read
     */
    virtual bool read(ConnectionReader& connection) = 0;

};

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?