Synopsis - Cross-Reference
File: /Synopsis/Parsers/IDL/idlrepoId.h1// -*- c++ -*- 2// Package : omniidl 3// idlrepoId.h Created on: 1999/10/11 4// Author : Duncan Grisby (dpg1) 5// 6// Copyright (C) 1999 AT&T Laboratories Cambridge 7// 8// This file is part of omniidl. 9// 10// omniidl is free software; you can redistribute it and/or modify it 11// under the terms of the GNU General Public License as published by 12// the Free Software Foundation; either version 2 of the License, or 13// (at your option) any later version. 14// 15// This program is distributed in the hope that it will be useful, 16// but WITHOUT ANY WARRANTY; without even the implied warranty of 17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18// General Public License for more details. 19// 20// You should have received a copy of the GNU General Public License 21// along with this program; if not, write to the Free Software 22// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 23// 02111-1307, USA. 24// 25// Description: 26// 27// Definitions for repoId management 28 29// $Id: idlrepoId.h,v 1.7.2.2 2005/05/10 22:07:31 dgrisby Exp $ 30// $Log: idlrepoId.h,v $ 31// Revision 1.7.2.2 2005/05/10 22:07:31 dgrisby 32// Merge again. 33// 34// Revision 1.7.2.1 2003/03/23 21:01:45 dgrisby 35// Start of omniORB 4.1.x development branch. 36// 37// Revision 1.4.2.2 2000/10/27 16:31:09 dpg1 38// Clean up of omniidl dependencies and types, from omni3_develop. 39// 40// Revision 1.4.2.1 2000/07/17 10:36:04 sll 41// Merged from omni3_develop the diff between omni3_0_0_pre3 and omni3_0_0. 42// 43// Revision 1.5 2000/07/13 15:25:53 dpg1 44// Merge from omni3_develop for 3.0 release. 45// 46// Revision 1.2 1999/11/02 17:07:25 dpg1 47// Changes to compile on Solaris. 48// 49// Revision 1.1 1999/10/27 14:05:55 dpg1 50// *** empty log message *** 51// 52 53#ifndef _idlrepoId_h 54#define _idlrepoId_h 55 56#include <idlutil.h> 57 58class Prefix { 59public: 60 // Static prefix manipulation functions 61 62 // Return the current prefix string 63 static const char* current(); 64 65 // Make prefix for a new scope or file 66 static void newScope(const char* name); 67 static void newFile(); 68 69 // Set prefix for current scope 70 static void setPrefix(const char* prefix); 71 72 // Finish with a scope or file, reverting to the previous prefix 73 static void endScope(); 74 static void endFile(); 75 static void endOuterFile(); 76 77 78protected: 79 Prefix(char* str, IDL_Boolean isfile); 80 ~Prefix(); 81 82 // Get/set operations on this prefix node 83 const char* get(); 84 void set(const char* setTo); 85 IDL_Boolean isfile(); 86 87private: 88 char* str_; // Prefix string 89 Prefix* parent_; // Previous prefix 90 IDL_Boolean isfile_; // True if prefix is at file scope 91 92 static Prefix* current_; 93}; 94 95 96#endif // _idlrepoId_h