cpp_photon/include/entrypoint.hpp

62 lines
1.4 KiB
C++
Raw Normal View History

2005-02-07 02:00:48 +00:00
//This file is part of Photon (http://photon.sourceforge.net)
//Copyright (C) 2004-2005 James Turk
//
// Author:
// James Turk (jpt2433@rit.edu)
//
// Version:
2005-08-08 19:19:21 +00:00
// $Id: entrypoint.hpp,v 1.8 2005/08/08 19:19:25 cozman Exp $
2005-02-07 02:00:48 +00:00
2005-02-13 22:12:02 +00:00
#ifndef PHOTON_ENTRYPOINT_HPP
#define PHOTON_ENTRYPOINT_HPP
2005-02-07 02:00:48 +00:00
2005-02-13 22:12:02 +00:00
#include "Log.hpp"
2005-02-07 02:00:48 +00:00
2005-08-08 19:19:21 +00:00
// Title: PhotonMain
// PhotonMain is the entrypoint for all Photon applications, attempting to use
// main will result in an error message since main is defined within the
// library. Using PhotonMain as an entrypoint allows you to bypass any manual
// initialization of the core Photon library.
//
// Example PhotonMain Usage:
// (code)
//
// class MainMenu : public State
// {
// ...
// };
//
// int PhotonMain(const StrVec& args)
// {
// // create window
// Application::getInstance().createDisplay(800,600,32,0,0,false);
//
// // set current state
// Application::getInstance().setCurrentState<MainMenu>();
//
// // can also add any tasks here
//
// // run until finished
// Kernel::getInstance().run();
//
// return 0;
// }
// (end)
// Function: PhotonMain
// Entrypoint for Photon applications.
//
// Arguments:
// args - <StrVec> containing command line arguments.
//
// Returns:
// zero on success, non-zero on failure, just like standard main.
int PhotonMain(const photon::StrVec& args);
2005-02-07 02:00:48 +00:00
2005-08-08 19:19:21 +00:00
int main(int argc, const char** argv);
2005-02-07 02:00:48 +00:00
2005-02-13 22:12:02 +00:00
#endif //PHOTON_ENTRYPOINT_HPP