6fb9b25791778f69002eb72be6235e20d98ec452Tinderbox User// Automated Testing Framework (atf)
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews// Copyright (c) 2007 The NetBSD Foundation, Inc.
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews// All rights reserved.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// Redistribution and use in source and binary forms, with or without
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// modification, are permitted provided that the following conditions
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// 1. Redistributions of source code must retain the above copyright
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// notice, this list of conditions and the following disclaimer.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// 2. Redistributions in binary form must reproduce the above copyright
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// notice, this list of conditions and the following disclaimer in the
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// documentation and/or other materials provided with the distribution.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND
8462dfb880040cde3a60f047ec18808737fd7e85Mark Andrews// CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
420a43c8d8028992a4e9c170022f97bfac689025Evan Hunt// IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
8d31dd9ab62d91b5f23ac687657c966d44074a3fMark Andrews// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
28479307225582ad0b2e11441d85fcf5169551d0Mark Andrews// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// ------------------------------------------------------------------------
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// The "usage_error" class.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// ------------------------------------------------------------------------
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews usage_error(const char*, ...) throw();
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews ~usage_error(void) throw();
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews const char* what(void) const throw();
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// ------------------------------------------------------------------------
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// The "option" class.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// ------------------------------------------------------------------------
554d22d2deb8889bb16434176b5716ab79d15c50Mark Andrews friend class app;
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews option(char, const std::string&, const std::string&);
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews bool operator<(const option&) const;
dd14c953a8a42b60ea86a2a630529014fc3d14ddMark Andrews// ------------------------------------------------------------------------
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// The "app" class.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews// ------------------------------------------------------------------------
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews // To be redefined.
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews virtual options_set specific_options(void) const;
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews virtual void process_option(int, const char*);
c3c8823fed039b3a2b8e5ca8bc2f3301d1dd840eMark Andrews virtual int main(void) = 0;
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews app(const std::string&, const std::string&, const std::string&);
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews virtual ~app(void);
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews int run(int, char* const*);
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews} // namespace application
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews} // namespace tools
6098d364b690cb9dabf96e9664c4689c8559bd2eMark Andrews#endif // !defined(TOOLS_APPLICATION_HPP)