From 925a3d0978bd31b739b026e5a37a0868bab101cd Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 22 Jun 2004 17:57:23 +0000 Subject: [PATCH] fix missing includes --- direct/src/dcparser/Sources.pp | 4 +++ direct/src/dcparser/dcClass.cxx | 1 + direct/src/dcparser/dcClass.h | 1 + direct/src/dcparser/dcField.h | 12 +-------- direct/src/dcparser/dcMolecularField.h | 1 + direct/src/dcparser/dcPacker.h | 1 + direct/src/dcparser/dcPython.h | 37 ++++++++++++++++++++++++++ direct/src/dcparser/dcTypedef.cxx | 4 +-- 8 files changed, 48 insertions(+), 13 deletions(-) create mode 100755 direct/src/dcparser/dcPython.h diff --git a/direct/src/dcparser/Sources.pp b/direct/src/dcparser/Sources.pp index bb27355ace..96573de445 100644 --- a/direct/src/dcparser/Sources.pp +++ b/direct/src/dcparser/Sources.pp @@ -27,6 +27,7 @@ dcParameter.h dcClassParameter.h dcArrayParameter.h dcSimpleParameter.h \ dcNumericRange.h dcNumericRange.I \ dcTypedef.h \ + dcPython.h \ dcbase.h dcindent.h hashGenerator.h \ primeNumberGenerator.h @@ -45,5 +46,8 @@ dcindent.cxx \ hashGenerator.cxx primeNumberGenerator.cxx + // #define SOURCES $[SOURCES] $[INCLUDED_SOURCES] + // #define COMBINED_SOURCES + #define IGATESCAN all #end lib_target diff --git a/direct/src/dcparser/dcClass.cxx b/direct/src/dcparser/dcClass.cxx index 309581cb83..cb5a83b156 100644 --- a/direct/src/dcparser/dcClass.cxx +++ b/direct/src/dcparser/dcClass.cxx @@ -17,6 +17,7 @@ //////////////////////////////////////////////////////////////////// #include "dcClass.h" +#include "dcAtomicField.h" #include "dcParameter.h" #include "hashGenerator.h" #include "dcindent.h" diff --git a/direct/src/dcparser/dcClass.h b/direct/src/dcparser/dcClass.h index d478f8a921..eb4e4f87f6 100644 --- a/direct/src/dcparser/dcClass.h +++ b/direct/src/dcparser/dcClass.h @@ -22,6 +22,7 @@ #include "dcbase.h" #include "dcField.h" #include "dcDeclaration.h" +#include "dcPython.h" class HashGenerator; class DCParameter; diff --git a/direct/src/dcparser/dcField.h b/direct/src/dcparser/dcField.h index e4ae6f0b79..d51760209f 100644 --- a/direct/src/dcparser/dcField.h +++ b/direct/src/dcparser/dcField.h @@ -21,17 +21,7 @@ #include "dcbase.h" #include "dcPackerInterface.h" - -#ifdef HAVE_PYTHON - -#undef HAVE_LONG_LONG // NSPR and Python both define this. -#include - -// We only need these headers if we are also building a Python interface. -#include "datagram.h" -#include "datagramIterator.h" - -#endif // HAVE_PYTHON +#include "dcPython.h" class DCAtomicField; class DCMolecularField; diff --git a/direct/src/dcparser/dcMolecularField.h b/direct/src/dcparser/dcMolecularField.h index f3ada2e115..9cd136f081 100644 --- a/direct/src/dcparser/dcMolecularField.h +++ b/direct/src/dcparser/dcMolecularField.h @@ -23,6 +23,7 @@ #include "dcField.h" class DCAtomicField; +class DCParameter; //////////////////////////////////////////////////////////////////// // Class : DCMolecularField diff --git a/direct/src/dcparser/dcPacker.h b/direct/src/dcparser/dcPacker.h index 4da57d5438..562557376f 100755 --- a/direct/src/dcparser/dcPacker.h +++ b/direct/src/dcparser/dcPacker.h @@ -24,6 +24,7 @@ #include "dcSubatomicType.h" #include "dcPackData.h" #include "dcPackerCatalog.h" +#include "dcPython.h" //////////////////////////////////////////////////////////////////// // Class : DCPacker diff --git a/direct/src/dcparser/dcPython.h b/direct/src/dcparser/dcPython.h new file mode 100755 index 0000000000..1d2ed299e3 --- /dev/null +++ b/direct/src/dcparser/dcPython.h @@ -0,0 +1,37 @@ +// Filename: dcPython.h +// Created by: drose (22Jun04) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved +// +// All use of this software is subject to the terms of the Panda 3d +// Software license. You should have received a copy of this license +// along with this source code; you will also find a current copy of +// the license at http://etc.cmu.edu/panda3d/docs/license/ . +// +// To contact the maintainers of this program write to +// panda3d-general@lists.sourceforge.net . +// +//////////////////////////////////////////////////////////////////// + +#ifndef DCPYTHON_H +#define DCPYTHON_H + +// The only purpose of this file is to serve as a common place to put +// the nonsense associated with #including . + +#ifdef HAVE_PYTHON + +#undef HAVE_LONG_LONG // NSPR and Python both define this. +#include + +// Several interfaces in this module that use Python also require +// these header files, so we might as well pick them up too. +#include "datagram.h" +#include "datagramIterator.h" + +#endif // HAVE_PYTHON + +#endif diff --git a/direct/src/dcparser/dcTypedef.cxx b/direct/src/dcparser/dcTypedef.cxx index 0562940ae7..8746f45ce2 100644 --- a/direct/src/dcparser/dcTypedef.cxx +++ b/direct/src/dcparser/dcTypedef.cxx @@ -16,9 +16,9 @@ // //////////////////////////////////////////////////////////////////// +#include "dcTypedef.h" #include "dcParameter.h" -#include "hashGenerator.h" -#include "dcParameter.h" +#include "dcSimpleParameter.h" #include "dcindent.h" ////////////////////////////////////////////////////////////////////