Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

dtool/src/cppparser/cppParameterList.h

Go to the documentation of this file.
00001 // Filename: cppParameterList.h
00002 // Created by:  drose (21Oct99)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef CPPPARAMETERLIST_H
00020 #define CPPPARAMETERLIST_H
00021 
00022 #include <dtoolbase.h>
00023 
00024 #include "cppDeclaration.h"
00025 
00026 #include <vector>
00027 
00028 class CPPInstance;
00029 class CPPScope;
00030 
00031 ///////////////////////////////////////////////////////////////////
00032 //       Class : CPPParameterList
00033 // Description :
00034 ////////////////////////////////////////////////////////////////////
00035 class CPPParameterList {
00036 public:
00037   CPPParameterList();
00038 
00039   bool is_equivalent(const CPPParameterList &other) const;
00040 
00041   bool operator == (const CPPParameterList &other) const;
00042   bool operator != (const CPPParameterList &other) const;
00043   bool operator < (const CPPParameterList &other) const;
00044 
00045   bool is_tbd() const;
00046 
00047   bool is_fully_specified() const;
00048   CPPParameterList *substitute_decl(CPPDeclaration::SubstDecl &subst,
00049                                     CPPScope *current_scope,
00050                                     CPPScope *global_scope);
00051 
00052   CPPParameterList *resolve_type(CPPScope *current_scope,
00053                                  CPPScope *global_scope);
00054 
00055   // This vector contains a list of formal parameters, in order.  A
00056   // parameter may have an empty identifer name.
00057   typedef vector<CPPInstance *> Parameters;
00058   Parameters _parameters;
00059   bool _includes_ellipsis;
00060 
00061   void output(ostream &out, CPPScope *scope, bool parameter_names,
00062               int num_default_parameters = -1) const;
00063 };
00064 
00065 inline ostream &
00066 operator << (ostream &out, const CPPParameterList &plist) {
00067   plist.output(out, (CPPScope *)NULL, true);
00068   return out;
00069 }
00070 
00071 #endif
00072 
00073 

Generated on Thu May 1 22:12:53 2003 for DTool by doxygen1.3