/*
* freescope - Free source browser
* Copyright (C) 2001 Olivier Deme
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*
* FILE: cli.h
*
* DESCRIPTION: This file declares the class Cli which is a user of the
* symbol database and, as such, derives from DbUser.
* The cli (Command Lime Interface) provides a single shot
* database querying to the freescope user. As soon as the
* result has been displayed, the program should exit.
*
*/
#ifndef _CLI_H_
#define _CLI_H_
/************/
/* INCLUDES */
/************/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /* HAVE_CONFIG_H */
#include "dbuser.h"
/**********************/
/* CLASS DECLARATIONS */
/**********************/
class Cli : public DbUser
{
// CONSTRUCTORS
public:
virtual ~Cli () {};
// METHODS:
public:
void do_init() throw (DbUser_Exception);
void do_loop();
protected:
void display_result ();
void terminate (const string& reason);
private:
static void on_sigpipe (int signo, void* arg);
// ATTRIBUTES:
private:
unsigned int m_count;
query_type_t m_query_type;
};
#endif //_CLI_H_
syntax highlighted by Code2HTML, v. 0.9.1