unix/SysInterpreterInstance.hpp
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* */
3 /* Copyright (c) 2005-2009 Rexx Language Association. All rights reserved. */
4 /* */
5 /* This program and the accompanying materials are made available under */
6 /* the terms of the Common Public License v1.0 which accompanies this */
7 /* distribution. A copy is also available at the following address: */
8 /* http://www.ibm.com/developerworks/oss/CPLv1.0.htm */
9 /* */
10 /* Redistribution and use in source and binary forms, with or */
11 /* without modification, are permitted provided that the following */
12 /* conditions are met: */
13 /* */
14 /* Redistributions of source code must retain the above copyright */
15 /* notice, this list of conditions and the following disclaimer. */
16 /* Redistributions in binary form must reproduce the above copyright */
17 /* notice, this list of conditions and the following disclaimer in */
18 /* the documentation and/or other materials provided with the distribution. */
19 /* */
20 /* Neither the name of Rexx Language Association nor the names */
21 /* of its contributors may be used to endorse or promote products */
22 /* derived from this software without specific prior written permission. */
23 /* */
24 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
25 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
26 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
27 /* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
28 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
29 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
30 /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
31 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
32 /* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
33 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
34 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
35 /* */
36 /*----------------------------------------------------------------------------*/
37 /******************************************************************************/
38 /* REXX Kernel */
39 /* */
40 /* Manage system-specific aspects of an interpreter instance. */
41 /* */
42 /******************************************************************************/
43 #ifndef Included_SysInterpreterInstance_hpp
44 #define Included_SysInterpreterInstance_hpp
45 
47 class RexxActivation;
48 
50 {
51 public:
52  void live(size_t);
53  void liveGeneral(int);
54 
55  void initialize(InterpreterInstance *i, RexxOption *options);
56  void terminate();
57  RexxString *resolveProgramName(RexxString *_name, RexxString *_parentDir, RexxString *_parentExtension);
59  void setupProgram(RexxActivation *activation);
60 
61 protected:
62  void addSearchExtension(const char *name);
63 
64  InterpreterInstance *instance; // backlink to our instance container
65  bool externalTraceEnabled; // are we started with external trace on
66  char *externalTraceOption; // given by RXTRACE
67 };
68 
69 
71 {
72 public:
73  SysSearchPath(const char *parent, const char *extension);
75 
76  char *path; // the constructed path
77 };
78 
79 
80 #endif
void registerCommandHandlers(InterpreterInstance *i)
void addSearchExtension(const char *name)
RexxString * resolveProgramName(RexxString *_name, RexxString *_parentDir, RexxString *_parentExtension)
void initialize(InterpreterInstance *i, RexxOption *options)
void setupProgram(RexxActivation *activation)
SysSearchPath(const char *parent, const char *extension)