~ubuntu-branches/ubuntu/karmic/rkward/karmic

« back to all changes in this revision

Viewing changes to rkward/core/renvironmentobject.h

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Friedrichsmeier
  • Date: 2006-11-06 16:30:00 UTC
  • mfrom: (1.2.1 upstream) (3.1.1 feisty)
  • Revision ID: james.westby@ubuntu.com-20061106163000-qi8ju75eqecrfay7
* new upstream release
* depend on either php4-cli or php5-cli

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
                          renvironmentobject  -  description
 
3
                             -------------------
 
4
    begin                : Wed Sep 27 2006
 
5
    copyright            : (C) 2006 by Thomas Friedrichsmeier
 
6
    email                : tfry@users.sourceforge.net
 
7
 ***************************************************************************/
 
8
 
 
9
/***************************************************************************
 
10
 *                                                                         *
 
11
 *   This program is free software; you can redistribute it and/or modify  *
 
12
 *   it under the terms of the GNU General Public License as published by  *
 
13
 *   the Free Software Foundation; either version 2 of the License, or     *
 
14
 *   (at your option) any later version.                                   *
 
15
 *                                                                         *
 
16
 ***************************************************************************/
 
17
#ifndef RENVIRONMENTOBJECT_H
 
18
#define RENVIRONMENTOBJECT_H
 
19
 
 
20
#include "rcontainerobject.h"
 
21
 
 
22
class RCommand;
 
23
class RCommandChain;
 
24
 
 
25
/**
 
26
This class roughly corresponds to an enviroment in R. It keeps a list of all objects in that environment.
 
27
 
 
28
@author Thomas Friedrichsmeier
 
29
*/
 
30
class REnvironmentObject : public RContainerObject {
 
31
public:
 
32
        REnvironmentObject (RContainerObject *parent, const QString &name);
 
33
        ~REnvironmentObject ();
 
34
 
 
35
        void updateFromR (RCommandChain *chain);
 
36
 
 
37
        QString getFullName ();
 
38
        QString makeChildName (const QString &short_child_name, bool misplaced=false);
 
39
        QString makeChildBaseName (const QString &short_child_name);
 
40
/** reimplemented from RContainerObject: If this is an environment var, call RContainerObject::writeMetaData (). Else, do nothing. An environment has no meta data. */
 
41
        void writeMetaData (RCommandChain *chain);
 
42
        QString namespaceName () { return namespace_name; };
 
43
protected:
 
44
        bool updateStructure (RData *new_data);
 
45
/** reimplemented from RContainerObject to raise an assert if this is not the isGlobalEnv (). Otherwise calls "remove (objectname)" instead of objectname <- NULL" */
 
46
        void renameChild (RObject *object, const QString &new_name);
 
47
/** reimplemented from RContainerObject to raise an assert if this is not the isGlobalEnv (). Otherwise calls "remove (objectname)" instead of objectname <- NULL" */
 
48
        void removeChild (RObject *object, bool removed_in_workspace);
 
49
/// reimplemented from RContainerObject to call "remove (objectname)" instead of "objectname <- NULL"
 
50
        QString removeChildCommand (RObject *object);
 
51
/// reimplemented from RContainerObject to call "remove (objectname)" instead of "objectname <- NULL"
 
52
        QString renameChildCommand (RObject *object, const QString &new_name);
 
53
        QString namespace_name;
 
54
};
 
55
 
 
56
#endif