Synopsis - Cross-Reference
File: Synopsis/Parsers/IDL/idlvisitor.py1# -*- python -*- 2# Package : omniidl 3# idlvisitor.py Created on: 1999/10/27 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# Base classes for Visitors 28 29# $Id: idlvisitor.py,v 1.8.2.1 2003/03/23 21:01:38 dgrisby Exp $ 30# $Log: idlvisitor.py,v $ 31# Revision 1.8.2.1 2003/03/23 21:01:38 dgrisby 32# Start of omniORB 4.1.x development branch. 33# 34# Revision 1.5.2.2 2000/11/01 12:46:00 dpg1 35# Update to CORBA 2.4 specification. 36# 37# Revision 1.5.2.1 2000/07/17 10:36:07 sll 38# Merged from omni3_develop the diff between omni3_0_0_pre3 and omni3_0_0. 39# 40# Revision 1.6 2000/07/13 15:25:51 dpg1 41# Merge from omni3_develop for 3.0 release. 42# 43# Revision 1.3 1999/11/15 15:49:23 dpg1 44# Documentation strings. 45# 46# Revision 1.2 1999/10/29 18:20:01 dpg1 47# Clean up 48# 49# Revision 1.1 1999/10/29 15:47:07 dpg1 50# First revision. 51# 52 53"""Visitor pattern visitors for AST nodes and types 54 55This module declares abstract visitor classes for visiting AST nodes 56and type objects. Python's type system means that you do not actually 57need to derive from these classes to implement visitors. This module 58only really exists to show what functions should exist in visitors. 59 60Classes: 61 62 AstVisitor -- visitor for classes in idlast.py 63 TypeVisitor -- visitor for classes in idltype.py""" 64 65class AstVisitor : 66 """Visitor for AST nodes 67 68Functions: 69 70 visitAST(node) 71 visitModule(node) 72 visitInterface(node) 73 visitForward(node) 74 visitConst(node) 75 visitDeclarator(node) 76 visitTypedef(node) 77 visitMember(node) 78 visitStruct(node) 79 visitStructForward(node) 80 visitException(node) 81 visitCaseLabel(node) 82 visitUnionCase(node) 83 visitUnion(node) 84 visitUnionForward(node) 85 visitEnumerator(node) 86 visitEnum(node) 87 visitAttribute(node) 88 visitParameter(node) 89 visitOperation(node) 90 visitNative(node) 91 visitStateMember(node) 92 visitFactory(node) 93 visitValueForward(node) 94 visitValueBox(node) 95 visitValueAbs(node) 96 visitValue(node)""" 97 98 def visitAST(self, node): return 99 def visitModule(self, node): return 100 def visitInterface(self, node): return 101 def visitForward(self, node): return 102 def visitConst(self, node): return 103 def visitDeclarator(self, node): return 104 def visitTypedef(self, node): return 105 def visitMember(self, node): return 106 def visitStruct(self, node): return 107 def visitStructForward(self, node): return 108 def visitException(self, node): return 109 def visitCaseLabel(self, node): return 110 def visitUnionCase(self, node): return 111 def visitUnion(self, node): return 112 def visitUnionForward(self, node): return 113 def visitEnumerator(self, node): return 114 def visitEnum(self, node): return 115 def visitAttribute(self, node): return 116 def visitParameter(self, node): return 117 def visitOperation(self, node): return 118 def visitNative(self, node): return 119 def visitStateMember(self, node): return 120 def visitFactory(self, node): return 121 def visitValueForward(self, node): return 122 def visitValueBox(self, node): return 123 def visitValueAbs(self, node): return 124 def visitValue(self, node): return 125 126 127class TypeVisitor: 128 """Visitor for Type objects 129 130Functions: 131 132 visitBaseType(type) 133 visitStringType(type) 134 visitWStringType(type) 135 visitSequenceType(type) 136 visitFixedType(type) 137 visitDeclaredType(type)""" 138 139 def visitBaseType(self, type): return 140 def visitStringType(self, type): return 141 def visitWStringType(self, type): return 142 def visitSequenceType(self, type): return 143 def visitFixedType(self, type): return 144 def visitDeclaredType(self, type): return 145
Generated on Tue May 13 02:39:14 2008 by
synopsis (version 0.10)
synopsis (version 0.10)