clangmetamsg.h

来自「2009 ROBOCUP 仿真2DSERVER 源码」· C头文件 代码 · 共 139 行

H
139
字号
// -*-c++-*-/***************************************************************************                                clangmetamsg.h                       Class for CLang Meta messages                             -------------------    begin                : 28-MAY-2002    copyright            : (C) 2002 by The RoboCup Soccer Server                           Maintenance Group.    email                : sserver-admin@lists.sourceforge.net***************************************************************************//*************************************************************************** *                                                                         * *   This program is free software; you can redistribute it and/or modify  * *   it under the terms of the GNU LGPL as published by the Free Software  * *   Foundation; either version 2 of the License, or (at your option) any  * *   later version.                                                        * *                                                                         * ***************************************************************************/#ifndef CLANGMETAMSG_H#define CLANGMETAMSG_H#include "clangmsg.h"#include <list>namespace rcss {namespace clang {class MetaTokenVer;class MetaToken {protected:    MetaToken();public:    virtual    ~MetaToken();    virtual    std::auto_ptr< MetaToken > deepCopy() const = 0;    virtual    std::ostream & print( std::ostream & out ) const = 0;    virtual    std::ostream & printPretty( std::ostream & out,                                const std::string & line_header ) const = 0;};class MetaTokenVer    : public MetaToken {public:    MetaTokenVer( const double& ver = 0.0 );    virtual    ~MetaTokenVer();    virtual    std::auto_ptr< MetaToken > deepCopy() const;    virtual    std::ostream & print( std::ostream & out ) const;    virtual    std::ostream & printPretty( std::ostream & out,                                const std::string & line_header ) const;//     double getVer() const//       {//           return M_ver;//       }private:	double M_ver;};class MetaMsg    : public Msg {public:    typedef std::list< MetaToken * > Storage;    MetaMsg();private:    MetaMsg( const Storage& tokens );public:    virtual    ~MetaMsg();    virtual    std::auto_ptr< Msg > deepCopy() const;    virtual    std::ostream & print( std::ostream & out ) const;    virtual    std::ostream & printPretty( std::ostream & out,                                const std::string & line_header ) const;    Storage & getTokens()      {          return M_tokens;      }    const Storage & getTokens() const      {          return M_tokens;      }	virtual	Types getType() const      {          return META;      }private:	Storage M_tokens;};inlinestd::ostream &operator<<( std::ostream & os,            const rcss::clang::MetaToken & mt ){    return mt.print( os );}}}#endif

⌨️ 快捷键说明

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