(file) Return to mofCompilerOptions.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Compiler

  1 karl  1.25 //%2006////////////////////////////////////////////////////////////////////////
  2 mike  1.9  //
  3 karl  1.20 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4            // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5            // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6 karl  1.19 // IBM Corp.; EMC Corporation, The Open Group.
  7 karl  1.20 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8            // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9 karl  1.21 // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10            // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11 karl  1.25 // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12            // EMC Corporation; Symantec Corporation; The Open Group.
 13 mike  1.9  //
 14            // Permission is hereby granted, free of charge, to any person obtaining a copy
 15 kumpf 1.13 // of this software and associated documentation files (the "Software"), to
 16            // deal in the Software without restriction, including without limitation the
 17            // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18 mike  1.9  // sell copies of the Software, and to permit persons to whom the Software is
 19            // furnished to do so, subject to the following conditions:
 20            // 
 21 kumpf 1.13 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 mike  1.9  // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23            // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24 kumpf 1.13 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25            // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26            // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27 mike  1.9  // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28            // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29            //
 30            //==============================================================================
 31            //
 32            // Author: Bob Blair (bblair@bmc.com)
 33            //
 34 gerarda 1.18 // Modified By: Gerarda Marquez (gmarquez@us.ibm.com)
 35              //              -- PEP 43 changes
 36 mike    1.9  //
 37              //%/////////////////////////////////////////////////////////////////////////////
 38              
 39              
 40              //
 41 bob     1.10 // Header for a class to hold options available to users of the
 42              // cimmof embeddable compiler.
 43 mike    1.9  //
 44              //
 45              //
 46              // Defines the mofCompilerOptions class, which contains all you
 47              // want to know about the command line that invoked the compiler,
 48              // including
 49              //             The include (-I) paths
 50              //             The repository to talk to (-R)
 51              //             Other compiler options
 52              //                 syntax check only (-E)
 53              //                 suppress warnings (-w)
 54              //             The files to be compiled.
 55              //
 56 karl    1.12 // ATTN: BB P3  Mar 2001 This needs to be reworked so that the same options
 57              // offered by the Microsoft compiler are supported.  They allow modes for
 58 mike    1.9  //      -- Marking as an error an attempt to create an existing object
 59              //      -- Marking as an error an attempt to create an existing object
 60              //         with different elements (i.e. overwriting)
 61              
 62              #ifndef _MOFCOMPILEROPTIONS_H_
 63              #define _MOFCOMPILEROPTIONS_H_
 64              
 65              #include <Pegasus/Common/String.h>
 66 kumpf   1.15 #include <Pegasus/Common/ArrayInternal.h>
 67 bob     1.10 #include <Pegasus/Compiler/compilerCommonDefs.h>
 68 kumpf   1.14 #include <Pegasus/Compiler/Linkage.h>
 69 mike    1.9  #include <iostream>
 70              
 71              PEGASUS_USING_STD;
 72              PEGASUS_USING_PEGASUS;
 73              
 74              class PEGASUS_COMPILER_LINKAGE mofCompilerOptions {
 75               private:
 76                Array<String> _include_paths;
 77                Array<String> _filespecs;
 78                String       _repository;
 79 jim.wunderlich 1.22   String        _repository_name;
 80                       String        _repository_mode;
 81 mike           1.9    String                _namespacePath;
 82                       Boolean         _syntax_only;
 83 bob            1.11   Boolean         _is_local;
 84 mike           1.9    Boolean         _suppress_warnings;
 85                       Boolean         _suppress_all_messages;
 86 bob            1.10   Boolean         _emit_xml;
 87                       compilerCommonDefs::operationType _ot;
 88 mike           1.9    Boolean         _trace;
 89 gerarda        1.18   Boolean	  _update_class;
 90                       Boolean	  _allow_experimental;
 91                       Boolean	  _allow_version;
 92 chuck          1.16 #ifdef PEGASUS_OS_OS400
 93                       Boolean         _quiet;
 94                     #endif
 95 mike           1.23   Boolean         _no_usage_warning;
 96                     
 97 mike           1.9    PEGASUS_STD(ostream)      *_traceos;
 98                       PEGASUS_STD(ostream)      *_erroros;
 99                       PEGASUS_STD(ostream)      *_warningos;
100                      public:
101                       mofCompilerOptions() : _repository(String::EMPTY), 
102 jim.wunderlich 1.22     _repository_name(String::EMPTY),
103                         _repository_mode(String::EMPTY),
104 mike           1.9      _namespacePath(""),
105                         _syntax_only(false),
106 bob            1.11     _is_local(false),
107 mike           1.9      _suppress_warnings(false),
108                         _suppress_all_messages(false),
109 bob            1.10     _emit_xml(false),
110                         _ot(compilerCommonDefs::USE_REPOSITORY),
111 mike           1.9      _trace(false),
112 mike           1.24     _no_usage_warning(false),
113 mike           1.9      _traceos(0),
114                         _erroros(0),
115                         _warningos(0)
116                         {;}
117                     
118                       ~mofCompilerOptions() {;}
119                     
120                       void add_include_path(const String& path) { _include_paths.append(path); }
121                       const Array<String> &get_include_paths() const { return _include_paths; }
122                       void add_filespecs(const String &spec) { _filespecs.append(spec); }
123                       const Array<String>& get_include_path_list() const {return _include_paths; }
124                       const Array<String>& get_filespec_list() const { return _filespecs; }
125 jim.wunderlich 1.22   void  set_repository(const String &repository) { \
126 mike           1.9      _repository = repository; }
127 jim.wunderlich 1.22   const String &get_repository() const { return _repository; }
128                       void  set_repository_name(const String &repository_name) { \
129                         _repository_name = repository_name; }
130                       const String &get_repository_name() const { return _repository_name; }
131                       void  set_repository_mode(const String &repository_mode) { \
132                         _repository_mode = repository_mode; }
133                       const String &get_repository_mode() const { return _repository_mode; }
134 mike           1.9    void set_syntax_only() { _syntax_only = true; }
135                       void reset_syntax_only() { _syntax_only = false; }
136                       Boolean syntax_only() const { return _syntax_only; }
137 bob            1.11   void set_is_local() { _is_local = true; }
138                       void reset_is_local() { _is_local = false; }
139                       Boolean is_local() const { return _is_local; }
140 mike           1.9    void set_suppress_warnings() { _suppress_warnings = true; }
141                       void reset_suppress_warnings() { _suppress_warnings = false; }
142                       Boolean suppress_warnings() const { return _suppress_warnings; }
143                       void set_suppress_all_messages() { _suppress_all_messages = true; }
144                       void reset_suppress_all_messages() { _suppress_all_messages = false; }
145                       Boolean suppress_all_messages() const { return _suppress_all_messages; }
146                       void set_trace() { _trace = true; }
147                       void reset_trace() { _trace = false; }
148                       Boolean trace() const { return _trace; }
149 gerarda        1.18   void set_update_class() { _update_class = true; }
150                       void reset_update_class() { _update_class = false; }
151                       Boolean update_class() const { return _update_class; }
152                       void set_allow_experimental() { _allow_experimental = true; }
153                       void reset_allow_experimental() { _allow_experimental = false; }
154                       Boolean allow_experimental() const { return _allow_experimental; }
155                       void set_allow_version() { _allow_version = true; }
156                       void reset_allow_version() { _allow_version = false; }
157                       Boolean allow_version() const { return _allow_version; }
158 chuck          1.16 #ifdef PEGASUS_OS_OS400
159                       void set_quiet() { _quiet = true; }
160                       void reset_quiet() { _quiet = false; }
161                       Boolean quiet() const { return _quiet; }
162                     #endif
163 bob            1.10   void set_operationType(compilerCommonDefs::operationType ot) { _ot = ot; }
164                       void reset_operationType() { _ot = compilerCommonDefs::USE_REPOSITORY; }
165                       compilerCommonDefs::operationType operationType() const { return _ot; }
166                       void set_xmloutput() { _emit_xml = true; }
167                       void reset_xmloutput() { _emit_xml = false; }
168                       Boolean xml_output() const { return _emit_xml; }
169 mike           1.9    void set_traceos(PEGASUS_STD(ostream) &os) { _traceos = &os; }
170                       void reset_traceos() { _traceos = 0; }
171                       ostream &traceos() const 
172                           { return _traceos ? (ostream&)*_traceos : (ostream&)cout; }
173                       void set_erroros(ostream &os) { _erroros = &os; }
174                       void reset_erroros() { _erroros = 0; }
175                       ostream &erroros() const 
176                           { return _erroros ? (ostream&)*_erroros : (ostream&)cerr; }
177                       void set_warningos(ostream &os) { _warningos = &os; }
178                       void reset_warningos() { _warningos = 0; }
179                       ostream &warningos() const 
180                           {return _warningos ? (ostream&)*_warningos : (ostream&)cerr;}
181                       void set_namespacePath(const String &path) { _namespacePath = path; }
182                       const String &get_namespacePath() const  { return _namespacePath; }
183 mike           1.23   void set_no_usage_warning() { _no_usage_warning = true; }
184                       Boolean get_no_usage_warning() const { return _no_usage_warning; }
185 mike           1.9  };
186                     
187                     #endif

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2