00001 //-*-c++-*- 00002 // ==================================================================== 00003 // ==================================================================== 00004 // 00005 // Module: opt_efinalize.h 00006 // $Revision: 1.1.1.1 $ 00007 // $Date: 2005/10/21 19:00:00 $ 00008 // $Author: marcel $ 00009 // $Source: /proj/osprey/CVS/open64/osprey1.0/be/opt/opt_efinalize.h,v $ 00010 // 00011 // ==================================================================== 00012 // 00013 // Copyright (C) 2000, 2001 Silicon Graphics, Inc. All Rights Reserved. 00014 // 00015 // This program is free software; you can redistribute it and/or modify 00016 // it under the terms of version 2 of the GNU General Public License as 00017 // published by the Free Software Foundation. 00018 // 00019 // This program is distributed in the hope that it would be useful, but 00020 // WITHOUT ANY WARRANTY; without even the implied warranty of 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 00022 // 00023 // Further, this software is distributed without any warranty that it 00024 // is free of the rightful claim of any third person regarding 00025 // infringement or the like. Any license provided herein, whether 00026 // implied or otherwise, applies only to this software file. Patent 00027 // licenses, if any, provided herein do not apply to combinations of 00028 // this program with other software, or any other product whatsoever. 00029 // 00030 // You should have received a copy of the GNU General Public License 00031 // along with this program; if not, write the Free Software Foundation, 00032 // Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. 00033 // 00034 // Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pky, 00035 // Mountain View, CA 94043, or: 00036 // 00037 // http://www.sgi.com 00038 // 00039 // For further information regarding this notice, see: 00040 // 00041 // http://oss.sgi.com/projects/GenInfo/NoticeExplan 00042 // 00043 // ==================================================================== 00044 // ==================================================================== 00045 00046 00047 class REHASH_INFO { 00048 private: 00049 typedef enum { 00050 RI_NONE = 0x0, 00051 RI_CODEREP_UNOWNABLE = 0x1 00052 } RI_FLAGS; 00053 00054 UINT32 _flags; 00055 EXP_OCCURS * _owning_t_ver; 00056 UINT32 _max_rehash_cost; 00057 CODEREP *const _coderep; 00058 00059 public: 00060 REHASH_INFO(CODEREP *coderep) : _coderep(coderep) 00061 { 00062 _owning_t_ver = NULL; 00063 _max_rehash_cost = 0; 00064 _flags = 0; 00065 } 00066 00067 CODEREP *Coderep() const { return _coderep; } 00068 00069 void Set_coderep_unownable(void) 00070 { _flags |= RI_CODEREP_UNOWNABLE; } 00071 00072 BOOL Coderep_unownable(void) const 00073 { return _flags & RI_CODEREP_UNOWNABLE; } 00074 00075 void Set_max_rehash_cost(UINT32 cost) 00076 { _max_rehash_cost = cost; } 00077 00078 UINT32 Max_rehash_cost(void) const { return _max_rehash_cost; } 00079 00080 void Set_owning_t_ver(EXP_OCCURS *occ) 00081 { _owning_t_ver = occ; } 00082 00083 EXP_OCCURS *Owning_t_ver(void) const { return _owning_t_ver; } 00084 00085 void Print(FILE *fp) const 00086 { 00087 if (_owning_t_ver != NULL) { 00088 _owning_t_ver->Print(fp); 00089 } 00090 else { 00091 fprintf(fp, " unowned"); 00092 } 00093 if (Coderep_unownable()) { 00094 fprintf(fp, " / unownable"); 00095 } 00096 fprintf(fp, "\n"); 00097 } 00098 };
1.5.6