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

dtool/src/cppparser/cppTemplateScope.h

Go to the documentation of this file.
00001 // Filename: cppTemplateScope.h
00002 // Created by:  drose (28Oct99)
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 CPPTEMPLATESCOPE_H
00020 #define CPPTEMPLATESCOPE_H
00021 
00022 #include <dtoolbase.h>
00023 
00024 #include "cppScope.h"
00025 #include "cppTemplateParameterList.h"
00026 
00027 ///////////////////////////////////////////////////////////////////
00028 //       Class : CPPTemplateScope
00029 // Description : This is an implicit scope that is created following
00030 //               the appearance of a "template<class x, class y>" or
00031 //               some such line in a C++ file.  It simply defines the
00032 //               template parameters.
00033 ////////////////////////////////////////////////////////////////////
00034 class CPPTemplateScope : public CPPScope {
00035 public:
00036   CPPTemplateScope(CPPScope *parent_scope);
00037 
00038   void add_template_parameter(CPPDeclaration *param);
00039 
00040   virtual void add_declaration(CPPDeclaration *decl, CPPScope *global_scope,
00041                                CPPPreprocessor *preprocessor,
00042                                const cppyyltype &pos);
00043   virtual void add_enum_value(CPPInstance *inst);
00044   virtual void define_extension_type(CPPExtensionType *type);
00045   virtual void define_namespace(CPPNamespace *scope);
00046   virtual void add_using(CPPUsing *using_decl, CPPScope *global_scope,
00047                          CPPPreprocessor *error_sink = NULL);
00048 
00049   virtual bool is_fully_specified() const;
00050 
00051   virtual string get_simple_name() const;
00052   virtual string get_local_name(CPPScope *scope = NULL) const;
00053   virtual string get_fully_scoped_name() const;
00054 
00055   virtual void output(ostream &out, CPPScope *scope) const;
00056 
00057   virtual CPPTemplateScope *as_template_scope();
00058 
00059   CPPTemplateParameterList _parameters;
00060 };
00061 
00062 #endif

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