[rkward-cvs] SF.net SVN: rkward:[3475] trunk/rkward/rkward/core

tfry at users.sourceforge.net tfry at users.sourceforge.net
Sat Mar 12 18:30:49 UTC 2011


Revision: 3475
          http://rkward.svn.sourceforge.net/rkward/?rev=3475&view=rev
Author:   tfry
Date:     2011-03-12 18:30:49 +0000 (Sat, 12 Mar 2011)

Log Message:
-----------
Forgot to add files. Sorry.

Added Paths:
-----------
    trunk/rkward/rkward/core/rslotspseudoobject.cpp
    trunk/rkward/rkward/core/rslotspseudoobject.h

Added: trunk/rkward/rkward/core/rslotspseudoobject.cpp
===================================================================
--- trunk/rkward/rkward/core/rslotspseudoobject.cpp	                        (rev 0)
+++ trunk/rkward/rkward/core/rslotspseudoobject.cpp	2011-03-12 18:30:49 UTC (rev 3475)
@@ -0,0 +1,45 @@
+/***************************************************************************
+                          rslotspseudoobject  -  description
+                             -------------------
+    begin                : Fri Mar 11 2011
+    copyright            : (C) 2011 by Thomas Friedrichsmeier
+    email                : tfry at users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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.                                   *
+ *                                                                         *
+ ***************************************************************************/
+
+#include "rslotspseudoobject.h"
+
+#include "../debug.h"
+
+RSlotsPseudoObject::RSlotsPseudoObject (RObject *parent, const QString &name) : RContainerObject (parent, name) {
+	RK_TRACE (OBJECTS);
+	RObject::name = "SLOTS";
+	type |= RObject::PseudoObject;
+}
+
+RSlotsPseudoObject::~RSlotsPseudoObject () {
+	RK_TRACE (OBJECTS);
+}
+
+QString RSlotsPseudoObject::getFullName () const {
+	RK_TRACE (OBJECTS);
+
+	return (".rk.get.slots (" + parent->getFullName () + ")");
+}
+
+QString RSlotsPseudoObject::makeChildName (const QString &short_child_name, bool) const {
+	RK_TRACE (OBJECTS);
+
+	QString safe_name = short_child_name;
+	if (irregularShortName (safe_name)) safe_name = rQuote (short_child_name);
+	return (parent->getFullName () + "@" + safe_name);
+}
+

Added: trunk/rkward/rkward/core/rslotspseudoobject.h
===================================================================
--- trunk/rkward/rkward/core/rslotspseudoobject.h	                        (rev 0)
+++ trunk/rkward/rkward/core/rslotspseudoobject.h	2011-03-12 18:30:49 UTC (rev 3475)
@@ -0,0 +1,39 @@
+/***************************************************************************
+                          rslotspseudoobject  -  description
+                             -------------------
+    begin                : Fri Mar 11 2011
+    copyright            : (C) 2011 by Thomas Friedrichsmeier
+    email                : tfry at users.sourceforge.net
+ ***************************************************************************/
+
+/***************************************************************************
+ *                                                                         *
+ *   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.                                   *
+ *                                                                         *
+ ***************************************************************************/
+#ifndef RSLOTSPSEUDOOBJECT_H
+#define RSLOTSPSEUDOOBJECT_H
+
+#include "rcontainerobject.h"
+
+class RCommand;
+class RCommandChain;
+
+/**
+This class represents a "pseudo" list of the S4 slots of the corresponding parent object. In R, no such object exists.
+
+ at author Thomas Friedrichsmeier
+*/
+class RSlotsPseudoObject : public RContainerObject {
+public:
+	RSlotsPseudoObject (RObject *parent, const QString &name);
+	~RSlotsPseudoObject ();
+
+	QString getFullName () const;
+	QString makeChildName (const QString &short_child_name, bool misplaced=false) const;
+};
+ 
+#endif


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list