fix eol-style

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15127 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-09-22 17:50:33 +00:00
parent 48bd3057a8
commit 577f9fca6f
2 changed files with 193 additions and 193 deletions

View File

@ -1,95 +1,95 @@
/** /**
* \file frontend/Application.C * \file frontend/Application.C
* This file is part of LyX, the document processor. * This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING. * Licence details can be found in the file COPYING.
* *
* \author Abdelrazak Younes * \author Abdelrazak Younes
* *
* Full author contact details are available in file CREDITS. * Full author contact details are available in file CREDITS.
*/ */
#include <config.h> #include <config.h>
#include "Application.h" #include "Application.h"
#include "funcrequest.h" #include "funcrequest.h"
#include "LyXAction.h" #include "LyXAction.h"
#include "lyxrc.h" #include "lyxrc.h"
#include "LyXView.h" #include "LyXView.h"
#include "support/lstrings.h" #include "support/lstrings.h"
#include "support/os.h" #include "support/os.h"
#include "support/package.h" #include "support/package.h"
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
using lyx::support::package; using lyx::support::package;
namespace lyx { namespace lyx {
namespace frontend { namespace frontend {
Application::Application(int & argc, char ** argv) Application::Application(int & argc, char ** argv)
{ {
} }
LyXFunc & Application::lyxFunc() LyXFunc & Application::lyxFunc()
{ {
return *lyxfunc_.get(); return *lyxfunc_.get();
} }
LyXFunc const & Application::lyxFunc() const LyXFunc const & Application::lyxFunc() const
{ {
return *lyxfunc_.get(); return *lyxfunc_.get();
} }
LyXServer & Application::server() LyXServer & Application::server()
{ {
return *lyx_server_.get(); return *lyx_server_.get();
} }
LyXServer const & Application::server() const LyXServer const & Application::server() const
{ {
return *lyx_server_.get(); return *lyx_server_.get();
} }
LyXServerSocket & Application::socket() LyXServerSocket & Application::socket()
{ {
return *lyx_socket_.get(); return *lyx_socket_.get();
} }
LyXServerSocket const & Application::socket() const LyXServerSocket const & Application::socket() const
{ {
return *lyx_socket_.get(); return *lyx_socket_.get();
} }
void Application::setBufferView(BufferView * buffer_view) void Application::setBufferView(BufferView * buffer_view)
{ {
buffer_view_ = buffer_view; buffer_view_ = buffer_view;
} }
int Application::start(std::string const & batch) int Application::start(std::string const & batch)
{ {
lyx_server_.reset(new LyXServer(lyxfunc_.get(), lyxrc.lyxpipes)); lyx_server_.reset(new LyXServer(lyxfunc_.get(), lyxrc.lyxpipes));
lyx_socket_.reset(new LyXServerSocket(lyxfunc_.get(), lyx_socket_.reset(new LyXServerSocket(lyxfunc_.get(),
lyx::support::os::internal_path(package().temp_dir() + "/lyxsocket"))); lyx::support::os::internal_path(package().temp_dir() + "/lyxsocket")));
// handle the batch commands the user asked for // handle the batch commands the user asked for
if (!batch.empty()) { if (!batch.empty()) {
lyxfunc_->dispatch(lyxaction.lookupFunc(batch)); lyxfunc_->dispatch(lyxaction.lookupFunc(batch));
} }
return exec(); return exec();
} }
} // namespace frontend } // namespace frontend
} // namespace lyx } // namespace lyx

View File

@ -1,98 +1,98 @@
/** /**
* \file frontend/Application.h * \file frontend/Application.h
* This file is part of LyX, the document processor. * This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING. * Licence details can be found in the file COPYING.
* *
* \author Abdelrazak Younes * \author Abdelrazak Younes
* *
* Full author contact details are available in file CREDITS. * Full author contact details are available in file CREDITS.
*/ */
#ifndef LYX_APPLICATION_H #ifndef LYX_APPLICATION_H
#define LYX_APPLICATION_H #define LYX_APPLICATION_H
#include "lyxfunc.h" #include "lyxfunc.h"
#include "lyxserver.h" #include "lyxserver.h"
#include "lyxsocket.h" #include "lyxsocket.h"
#include <boost/scoped_ptr.hpp> #include <boost/scoped_ptr.hpp>
#include <string> #include <string>
class BufferView; class BufferView;
class LyXView; class LyXView;
namespace lyx { namespace lyx {
namespace frontend { namespace frontend {
class Clipboard; class Clipboard;
class Gui; class Gui;
class Selection; class Selection;
/// The main application class /// The main application class
/** /**
There should be only one instance of this class. No Qt object There should be only one instance of this class. No Qt object
initialisation should be done before the instanciation of this class. initialisation should be done before the instanciation of this class.
\todo The work areas handling could be moved to a base virtual class \todo The work areas handling could be moved to a base virtual class
comon to all frontends. comon to all frontends.
*/ */
class Application class Application
{ {
public: public:
/// ///
Application(int & argc, char ** argv); Application(int & argc, char ** argv);
/// ///
virtual ~Application() {} virtual ~Application() {}
int start(std::string const & batch); int start(std::string const & batch);
/// ///
virtual Gui & gui() = 0; virtual Gui & gui() = 0;
/// ///
virtual int const exec() = 0; virtual int const exec() = 0;
/// ///
virtual void exit(int status) = 0; virtual void exit(int status) = 0;
/// ///
virtual Clipboard & clipboard() = 0; virtual Clipboard & clipboard() = 0;
/// ///
virtual Selection & selection() = 0; virtual Selection & selection() = 0;
/// ///
LyXFunc & lyxFunc(); LyXFunc & lyxFunc();
LyXFunc const & lyxFunc() const; LyXFunc const & lyxFunc() const;
/// ///
LyXServer & server(); LyXServer & server();
LyXServer const & server() const; LyXServer const & server() const;
/// ///
LyXServerSocket & socket(); LyXServerSocket & socket();
LyXServerSocket const & socket() const; LyXServerSocket const & socket() const;
/// ///
void setBufferView(BufferView * buffer_view); void setBufferView(BufferView * buffer_view);
protected: protected:
/// ///
BufferView * buffer_view_; BufferView * buffer_view_;
// FIXME: lyxfunc_ should be private. But the actual construction is done in // FIXME: lyxfunc_ should be private. But the actual construction is done in
// GuiApplication for now. // GuiApplication for now.
/// our function handler /// our function handler
boost::scoped_ptr<LyXFunc> lyxfunc_; boost::scoped_ptr<LyXFunc> lyxfunc_;
private: private:
/// ///
boost::scoped_ptr<LyXServer> lyx_server_; boost::scoped_ptr<LyXServer> lyx_server_;
/// ///
boost::scoped_ptr<LyXServerSocket> lyx_socket_; boost::scoped_ptr<LyXServerSocket> lyx_socket_;
}; // Application }; // Application
} // namespace frontend } // namespace frontend
} // namespace lyx } // namespace lyx
extern lyx::frontend::Application * theApp; extern lyx::frontend::Application * theApp;
#endif // LYX_APPLICATION_H #endif // LYX_APPLICATION_H