Revision: 41642
http://brlcad.svn.sourceforge.net/brlcad/?rev=41642&view=rev
Author: davidloman
Date: 2010-12-16 15:27:59 +0000 (Thu, 16 Dec 2010)
Log Message:
-----------
Stub in framework for 'login' 'logout' and 'Help' commands.
Modified Paths:
--------------
rt^3/trunk/src/GS/CMakeLists.txt
Added Paths:
-----------
rt^3/trunk/include/HelpCmd.h
rt^3/trunk/include/LoginCmd.h
rt^3/trunk/include/LogoutCmd.h
rt^3/trunk/src/GS/cmds/HelpCmd.cxx
rt^3/trunk/src/GS/cmds/LoginCmd.cxx
rt^3/trunk/src/GS/cmds/LogoutCmd.cxx
Added: rt^3/trunk/include/HelpCmd.h
===================================================================
--- rt^3/trunk/include/HelpCmd.h (rev 0)
+++ rt^3/trunk/include/HelpCmd.h 2010-12-16 15:27:59 UTC (rev 41642)
@@ -0,0 +1,54 @@
+/* H E L P C M D . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file HelpCmd.h
+ * HelpCmd.h
+ *
+ * Created on: Dec 16, 2010
+ */
+
+#ifndef __HELPCMD_H__
+#define __HELPCMD_H__
+
+#include "AbstractClientCmd.h"
+#include <QtCore/QString>
+
+class HelpCmd: public AbstractClientCmd {
+public:
+ HelpCmd();
+ virtual ~HelpCmd();
+
+ QString getUsage();
+ QString getHelp();
+
+protected:
+ bool _exec(GSClient* client, QStringList args);
+};
+
+#endif /* __HELPCMD_H__ */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: rt^3/trunk/include/HelpCmd.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Added: rt^3/trunk/include/LoginCmd.h
===================================================================
--- rt^3/trunk/include/LoginCmd.h (rev 0)
+++ rt^3/trunk/include/LoginCmd.h 2010-12-16 15:27:59 UTC (rev 41642)
@@ -0,0 +1,55 @@
+/* L O G I N C M D . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file LoginCmd.h
+ * LoginCmd.h
+ *
+ * Created on: Dec 16, 2010
+ *
+ */
+
+#ifndef __LOGINCMD_H__
+#define __LOGINCMD_H__
+
+#include "AbstractClientCmd.h"
+#include <QtCore/QString>
+
+class LoginCmd : public AbstractClientCmd {
+public:
+ LoginCmd();
+ virtual ~LoginCmd();
+
+ QString getUsage();
+ QString getHelp();
+
+protected:
+ bool _exec(GSClient* client, QStringList args);
+};
+
+#endif /* __LOGINCMD_H__ */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: rt^3/trunk/include/LoginCmd.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Added: rt^3/trunk/include/LogoutCmd.h
===================================================================
--- rt^3/trunk/include/LogoutCmd.h (rev 0)
+++ rt^3/trunk/include/LogoutCmd.h 2010-12-16 15:27:59 UTC (rev 41642)
@@ -0,0 +1,56 @@
+/* L O G O U T C M D . H
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file LogoutCmd.h
+ * LoginCmd.h
+ *
+ * Created on: Dec 16, 2010
+ *
+ */
+
+#ifndef __LOGOUTCMD_H__
+#define __LOGOUTCMD_H__
+
+#include "AbstractClientCmd.h"
+#include <QtCore/QString>
+
+class LogoutCmd : public AbstractClientCmd {
+public:
+ LogoutCmd();
+ virtual ~LogoutCmd();
+
+ QString getUsage();
+ QString getHelp();
+
+protected:
+ bool _exec(GSClient* client, QStringList args);
+};
+
+
+#endif /* __LOGOUTCMD_H__ */
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: rt^3/trunk/include/LogoutCmd.h
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Modified: rt^3/trunk/src/GS/CMakeLists.txt
===================================================================
--- rt^3/trunk/src/GS/CMakeLists.txt 2010-12-16 15:15:24 UTC (rev 41641)
+++ rt^3/trunk/src/GS/CMakeLists.txt 2010-12-16 15:27:59 UTC (rev 41642)
@@ -56,6 +56,9 @@
GSClient.cxx
cmds/ClientCmdRegistry.cxx
cmds/AbstractClientCmd.cxx
+ cmds/HelpCmd.cxx
+ cmds/LoginCmd.cxx
+ cmds/LogoutCmd.cxx
cmds/ShutdownCmd.cxx
)
@@ -70,8 +73,12 @@
IDataSource.h
FileDataSource.h
DbObject.h
+ GSClient.h
ClientCmdRegistry.h
AbstractClientCmd.h
+ HelpCmd.h
+ LoginCmd.h
+ LogoutCmd.h
ShutdownCmd.h
)
@@ -79,7 +86,6 @@
RT3_PROJECT_ADD_NOINST_HEADERS(
DbObjectManifest.h
GeometryProcessor.h
- GSClient.h
)
#Set QT INST headers
Added: rt^3/trunk/src/GS/cmds/HelpCmd.cxx
===================================================================
--- rt^3/trunk/src/GS/cmds/HelpCmd.cxx (rev 0)
+++ rt^3/trunk/src/GS/cmds/HelpCmd.cxx 2010-12-16 15:27:59 UTC (rev 41642)
@@ -0,0 +1,79 @@
+/* H E L P C M D . C X X
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file HelpCmd.cxx
+ * HelpCmd.cxx
+ *
+ * Created on: Dec 16, 2010
+ */
+
+#include "HelpCmd.h"
+#include "ClientCmdRegistry.h"
+
+HelpCmd::HelpCmd() : AbstractClientCmd("help") {}
+
+HelpCmd::~HelpCmd() {}
+
+QString
+HelpCmd::getUsage() {
+ return "Usage: help [cmdname]";
+}
+
+QString
+HelpCmd::getHelp() {
+ return "If envoked without any arguments, help diplays a list of
available commands. If a command name is provided as an argument, the help for
that command is displayed.";
+}
+
+bool
+HelpCmd::_exec(GSClient* client, QStringList args){
+
+ int argn = args.length();
+
+ if (argn < 0 || argn > 1) {
+ this->log->logERROR("HelpCmd", this->getUsage());
+ return false;
+ }
+
+ ClientCmdRegistry* ccReg = ClientCmdRegistry::getInstance();
+
+ if (argn == 0) {
+ /* display list of cmds */
+ QList<QString>* cmds = ccReg->getListOfCmds();
+
+
+
+ delete cmds;
+ return true;
+ }
+
+
+
+
+}
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
+
Property changes on: rt^3/trunk/src/GS/cmds/HelpCmd.cxx
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Added: rt^3/trunk/src/GS/cmds/LoginCmd.cxx
===================================================================
--- rt^3/trunk/src/GS/cmds/LoginCmd.cxx (rev 0)
+++ rt^3/trunk/src/GS/cmds/LoginCmd.cxx 2010-12-16 15:27:59 UTC (rev 41642)
@@ -0,0 +1,59 @@
+/* L O G I N C M D . C X X
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file LoginCmd.cxx
+ * LoginCmd.cxx
+ *
+ * Created on: Dec 16, 2010
+ *
+ */
+
+#include "LoginCmd.h"
+#include "PortalManager.h"
+
+LoginCmd::LoginCmd() : AbstractClientCmd("login"){}
+LoginCmd::~LoginCmd() {}
+
+QString
+LoginCmd::getUsage() {
+ return "Usage: login ip port uname passwd";
+}
+
+QString
+LoginCmd::getHelp() {
+ return "Attempts to make a connection and login to a GeometryService.";
+}
+
+bool
+LoginCmd::_exec(GSClient* client, QStringList args){
+ PortalManager* pm = client->getPortMan();
+
+}
+
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
+
Property changes on: rt^3/trunk/src/GS/cmds/LoginCmd.cxx
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
Added: rt^3/trunk/src/GS/cmds/LogoutCmd.cxx
===================================================================
--- rt^3/trunk/src/GS/cmds/LogoutCmd.cxx (rev 0)
+++ rt^3/trunk/src/GS/cmds/LogoutCmd.cxx 2010-12-16 15:27:59 UTC (rev
41642)
@@ -0,0 +1,58 @@
+/* L O G O U T C M D . C X X
+ * BRL-CAD
+ *
+ * Copyright (c) 2010 United States Government as represented by
+ * the U.S. Army Research Laboratory.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this file; see the file named COPYING for more
+ * information.
+ */
+/** @file LogoutCmd.cxx
+ * LogoutCmd.cxx
+ *
+ * Created on: Dec 16, 2010
+ *
+ */
+
+#include "LogoutCmd.h"
+#include "PortalManager.h"
+
+LogoutCmd::LogoutCmd() : AbstractClientCmd("logout") {}
+LogoutCmd::~LogoutCmd() {}
+
+QString
+LogoutCmd::getUsage() {
+ return "Usage: logout";
+}
+
+QString
+LogoutCmd::getHelp() {
+ return "Severs the connection to the current GeometryService.";
+}
+
+bool
+LogoutCmd::_exec(GSClient* client, QStringList args){
+ PortalManager* pm = client->getPortMan();
+
+}
+
+
+/*
+ * Local Variables:
+ * tab-width: 8
+ * mode: C
+ * indent-tabs-mode: t
+ * c-file-style: "stroustrup"
+ * End:
+ * ex: shiftwidth=4 tabstop=8
+ */
Property changes on: rt^3/trunk/src/GS/cmds/LogoutCmd.cxx
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Revision Date Author
Added: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Lotusphere 2011
Register now for Lotusphere 2011 and learn how
to connect the dots, take your collaborative environment
to the next level, and enter the era of Social Business.
http://p.sf.net/sfu/lotusphere-d2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits