[rkward-cvs] SF.net SVN: rkward: [796] trunk/rkward/rkward/core
tfry at users.sourceforge.net
tfry at users.sourceforge.net
Tue Oct 3 12:14:22 UTC 2006
Revision: 796
http://svn.sourceforge.net/rkward/?rev=796&view=rev
Author: tfry
Date: 2006-10-03 05:14:18 -0700 (Tue, 03 Oct 2006)
Log Message:
-----------
Rename RObject::EnvironmentVar to \!RObject::ToplevelEnv
Modified Paths:
--------------
trunk/rkward/rkward/core/renvironmentobject.cpp
trunk/rkward/rkward/core/robject.h
Modified: trunk/rkward/rkward/core/renvironmentobject.cpp
===================================================================
--- trunk/rkward/rkward/core/renvironmentobject.cpp 2006-10-03 11:24:07 UTC (rev 795)
+++ trunk/rkward/rkward/core/renvironmentobject.cpp 2006-10-03 12:14:18 UTC (rev 796)
@@ -26,8 +26,8 @@
RK_TRACE (OBJECTS);
type = Environment;
- if (parent != RObjectList::getObjectList ()) {
- type |= EnvironmentVar;
+ if (parent == RObjectList::getObjectList ()) {
+ type |= ToplevelEnv;
}
// TODO: determine namespace_name
@@ -41,22 +41,23 @@
QString REnvironmentObject::getFullName () {
RK_TRACE (OBJECTS);
- if (type & EnvironmentVar) return (parent->makeChildName (name));
- return ("as.environment (\"" + name + "\")");
+ if (type & ToplevelEnv) return ("as.environment (\"" + name + "\")");
+ return (parent->makeChildName (name));
}
QString REnvironmentObject::makeChildName (const QString &short_child_name) {
RK_TRACE (OBJECTS);
if (type & GlobalEnv) return (short_child_name);
- if (type & EnvironmentVar) return (name + "$" + short_child_name);
- return (namespace_name + "::" + RObject::rQuote (short_child_name));
+ if (type & ToplevelEnv) return (namespace_name + "::" + RObject::rQuote (short_child_name));
+ return (name + "$" + short_child_name);
}
void REnvironmentObject::writeMetaData (RCommandChain *chain) {
RK_TRACE (OBJECTS);
- if (type & EnvironmentVar) RContainerObject::writeMetaData (chain);
+ if (type & ToplevelEnv) return;
+ RContainerObject::writeMetaData (chain);
}
void REnvironmentObject::updateFromR () {
@@ -73,7 +74,7 @@
RK_ASSERT (new_data->getDataType () == RData::StructureVector);
RK_ASSERT (new_data->getDataLength () >= 5);
- if (type & EnvironmentVar) {
+ if (!(type & ToplevelEnv)) {
if (!RObject::updateStructure (new_data)) return false;
}
Modified: trunk/rkward/rkward/core/robject.h
===================================================================
--- trunk/rkward/rkward/core/robject.h 2006-10-03 11:24:07 UTC (rev 795)
+++ trunk/rkward/rkward/core/robject.h 2006-10-03 12:14:18 UTC (rev 796)
@@ -54,7 +54,7 @@
Function=128,
Environment=256,
GlobalEnv=512,
- EnvironmentVar=1024,
+ ToplevelEnv=1024,
HasMetaObject=2048
};
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