IIR.hh

Go to the documentation of this file.
00001 
00002 #ifndef IIR_HH
00003 #define IIR_HH
00004 
00005 // Copyright (c) 1996-1999 The University of Cincinnati.  
00006 // All rights reserved.
00007 
00008 // UC MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF 
00009 // THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
00010 // TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
00011 // PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  UC SHALL NOT BE LIABLE
00012 // FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
00013 // RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS
00014 // DERIVATIVES.
00015 
00016 // By using or copying this Software, Licensee agrees to abide by the
00017 // intellectual property laws, and all other applicable laws of the
00018 // U.S., and the terms of this license.
00019 
00020 
00021 // You may modify, distribute, and use the software contained in this package
00022 // under the terms of the "GNU LIBRARY GENERAL PUBLIC LICENSE" version 2,
00023 // June 1991. A copy of this license agreement can be found in the file
00024 // "LGPL", distributed with this archive.
00025 
00026 // Authors: Philip A. Wilsey    phil.wilsey@uc.edu
00027 //          Dale E. Martin      dmartin@cliftonlabs.com
00028 
00029 //---------------------------------------------------------------------------
00030 
00031 #include <iostream>
00032 #include <string>
00033 #include "IRBasicDataTypes.hh"
00034 #include "savant.hh"
00035 
00036 using std::string;
00037 
00038 class IIR_Identifier;
00039 class IIR_Declaration;
00040 class IIR_DesignFile;
00041 class IIR_TextLiteral;
00042 class IIR_TypeDefinition;
00043 class plugin_class_factory;
00044 
00048 class IIR {
00049 public:
00050 
00054   virtual IIR_Kind get_kind() const = 0;
00055 
00058   virtual IIR_Char *get_kind_text() const = 0;
00059 
00064   virtual string get_implementation_class() const = 0;
00065 
00069   virtual void set_file_name(IIR_Identifier *file_name, plugin_class_factory *) = 0;
00070   
00075   virtual void set_line_number(IIR_Int32 line_number) = 0;
00076 
00078   virtual IIR_Identifier *get_file_name() = 0;
00079 
00081   virtual IIR_Int32 get_line_number() const = 0;
00082 
00084   virtual IIR_DesignFile *get_design_file() const = 0;
00085   virtual void set_design_file(IIR_DesignFile *) = 0;
00086   
00088   virtual void set_base_info( IIR_DesignFile    *design_file,
00089                               int               line_number,
00090                               int               column_offset, 
00091                               int               character_offset ) = 0;
00092 
00093   virtual void copy_location( const IIR *, IIR *) = 0;
00094   virtual void copy_location(IIR *) = 0;
00095 #ifdef SCHEMATIC_INFO
00096 
00099   
00103   virtual void set_sheet_name(IIR_Identifier *sheet_name) = 0;
00104 
00108   virtual void set_x_coordinate(IIR_Int32 x_coordinate) = 0;
00109 
00113   virtual void set_y_coordinate(IIR_Int32 y_coordinate) = 0;
00114 
00116   virtual IIR_Identifier *get_sheet_name() = 0;
00117 
00119   virtual IIR_Int32 get_x_coordinate() = 0;
00120 
00122   virtual IIR_Int32 get_y_coordinate() = 0;
00123 
00125 
00126 #endif
00127 
00128 #ifdef EXTRA_LOCATERS
00129 
00134 
00138   virtual void set_column_offset(IIR_Int32 column_offset) = 0;
00139 
00143   virtual void set_character_offset(IIR_Int32 character_offset) = 0;
00144 
00146   virtual IIR_Int32 get_column_offset() = 0;
00147 
00149   virtual IIR_Int32 get_character_offset() = 0;
00151 
00152 #endif  
00153   
00156   virtual IIR_TextLiteral *get_prefix_string() = 0;
00157 
00162   virtual IIR* get_value() = 0;
00163 
00164   virtual ~IIR() {}
00165 
00170   virtual IIR* convert_tree(plugin_class_factory *) = 0;
00171 
00173   virtual IIR_SignalKind get_signal_kind() = 0;
00174   virtual IIR_Boolean is_guard_signal() = 0;
00175 
00176   virtual IIR_Boolean is_incomplete_type_declaration() = 0;
00177 
00183   virtual IIR_Boolean is_object() = 0;
00184 
00185   virtual IIR_Boolean is_name() = 0;
00186   virtual IIR_Boolean is_signal() = 0;
00187   virtual IIR_Boolean is_scalar_type() = 0;
00188   virtual IIR_Boolean is_record_type() = 0;
00189   virtual IIR_Boolean is_array_type() = 0;
00190   virtual IIR_Boolean is_entity_declaration() = 0;
00191   virtual IIR_Boolean is_resolved() = 0;
00192   virtual IIR_Boolean is_ascending_range() = 0;
00193   virtual IIR_Boolean is_subtype() = 0;
00194   virtual IIR_Boolean is_access_type() = 0;
00195   virtual IIR_Boolean is_interface() = 0;
00196   virtual IIR_Boolean is_enumeration_type() = 0;
00197   virtual IIR_Boolean is_text_literal() = 0;
00198   virtual IIR_Boolean is_aggregate_expression() = 0;
00199   virtual IIR_Boolean is_constant() = 0;
00200   virtual IIR_Boolean is_file_type() = 0;
00201   virtual IIR_Boolean is_type() = 0;
00202   virtual IIR_Boolean is_subprogram()  = 0;
00203   virtual IIR_Boolean is_integer_type() = 0;
00204   virtual IIR_Boolean is_character_type() = 0;
00205   virtual IIR_Boolean is_discrete_type() = 0;
00206   virtual IIR_Boolean is_variable() = 0;
00207   virtual IIR_Boolean is_literal() = 0;
00208   virtual IIR_Boolean is_operator() = 0;
00209   virtual IIR_Boolean is_above_attribute_found() = 0;
00210   virtual IIR_Boolean is_relational_operator() = 0;
00211   virtual IIR_Boolean is_logical_operator() = 0;
00212 
00215   virtual IIR_Boolean is_subtype_decl() = 0;
00216 
00218   virtual IIR_Boolean is_architecture_declaration() = 0;
00219 
00221   virtual IIR_Boolean is_attribute_declaration() = 0;
00222 
00224   virtual IIR_Boolean is_scalar_type_definition() = 0;
00225 
00227   virtual IIR_Boolean is_label() = 0;
00228 
00230   virtual IIR_Boolean is_component_declaration() = 0;
00231 
00233   virtual IIR_Boolean is_function_declaration() = 0;
00234 
00236   virtual IIR_Boolean is_configuration_declaration() = 0;
00237 
00239   virtual IIR_Boolean is_procedure_declaration() = 0;
00240 
00242   virtual IIR_Boolean is_package_declaration() = 0;
00243 
00245   virtual IIR_Boolean is_type_declaration() = 0;
00246 
00248   virtual IIR_Boolean is_subtype_declaration() = 0;
00249 
00251   virtual IIR_Boolean is_physical_unit() = 0;
00252 
00254   virtual IIR_Boolean is_group_declaration() = 0;
00255 
00257   virtual IIR_Boolean is_file() = 0;
00258 
00260 
00273   virtual IIR_Boolean is_locally_static() = 0;
00274 
00275   virtual IIR_TypeDefinition *get_subtype() = 0;
00276   virtual void set_subtype(IIR_TypeDefinition *) = 0;
00277 
00281   enum SignalAttribute {LAST_EVENT = 0, EVENT, ACTIVE, LAST_ACTIVE, LAST_VALUE,
00282                         DRIVING, DRIVING_VALUE, QUIET, STABLE, TRANSACTION,
00283                         INVALID};
00284 
00288   enum PublishedUnit {ENTITY_DECL, ARCHITECTURE_DECL, BLOCK, FUNCTION, 
00289                       PROCEDURE, PACKAGE_PUB, PACKAGE_BODY, PROCESS, 
00290                       PROCESS_STATE, TYPE, GENERIC_MAP, GENERATE_FOR, 
00291                       GENERATE_IF, DUMMY_ENTITY_DECL, CONFIGURATION_DECLARATION,
00292                       CASE_STATEMENT, NONE_PARSING, SIMULTANEOUS_STATEMENT, 
00293                       SIMULTANEOUS_IF, BREAK_STATEMENT, ABOVE_ATTRIBUTE, NONE}; 
00294 
00296   virtual IIR_Int32 get_num_indexes( ) = 0;
00297 
00298 
00308   virtual ostream &print( ostream & ) = 0;
00309 
00310   virtual IIR_TextLiteral *get_declarator() = 0;
00311 
00315   virtual IIR_Declaration* get_prefix_declaration() = 0;
00316 
00322   virtual void publish_vhdl( ostream &os ) = 0;
00323 
00324 };
00325 
00326 
00327 inline 
00328 ostream &
00329 operator<<(ostream &os, IIR &is ) {
00330   return is.print( os );
00331 }
00332 
00333 #endif

Generated on Fri Mar 31 11:04:13 2006 for Savant by  doxygen 1.4.6