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

dtool/src/dtoolbase/dtoolsymbols.h

Go to the documentation of this file.
00001 /* Filename: dtoolsymbols.h
00002  * Created by:  drose (18Feb00)
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 DTOOLSYMBOLS_H
00020 #define DTOOLSYMBOLS_H
00021 
00022 
00023 /*
00024   This file defines a slew of symbols that have particular meaning
00025   only when compiling in the WIN32 environment.  These symbols are
00026   prefixed to each class declaration, and each static data member
00027   within a class, that is to visible outside of a DLL.
00028 
00029   We need to specify a particular string for *exporting* the symbols
00030   when we are compiling a DLL, and for *importing* the symbols when
00031   we are accessing the DLL (that is, compiling some code that will
00032   link with the DLL, e.g. an executable program or a different DLL).
00033   The trick is that we have to be particular about whether we're
00034   exporting or importing the symbols for a specific DLL.
00035 
00036   We achieve this by defining a unique pair of symbols for each DLL.
00037   When we are building a particular DLL, we define the manifest
00038   BUILDING_libname on the command line.  This file then discovers
00039   that manifest and toggles the flag to *export* only for the symbols
00040   that belong to that DLL; the symbols that belong in each other DLL
00041   are set to *import*.
00042 
00043   Of course, this whole thing only matters under WIN32.  In the rest
00044   of the world we don't have to deal with this nonsense, and so we
00045   can define all of these stupid symbols to the empty string.
00046   */
00047 
00048 #define EXPCL_EMPTY
00049 
00050 #if defined(WIN32_VC) && !defined(CPPPARSER) && !defined(LINK_ALL_STATIC)
00051 
00052 #ifdef BUILDING_DTOOL
00053   #define EXPCL_DTOOL __declspec(dllexport)
00054   #define EXPTP_DTOOL
00055 #else
00056   #define EXPCL_DTOOL __declspec(dllimport)
00057   #define EXPTP_DTOOL extern
00058 #endif
00059 
00060 #ifdef BUILDING_DTOOLCONFIG
00061   #define EXPCL_DTOOLCONFIG __declspec(dllexport)
00062   #define EXPTP_DTOOLCONFIG
00063 #else
00064   #define EXPCL_DTOOLCONFIG __declspec(dllimport)
00065   #define EXPTP_DTOOLCONFIG extern
00066 #endif
00067 
00068 #ifdef BUILDING_MISC
00069   #define EXPCL_MISC __declspec(dllexport)
00070   #define EXPTP_MISC
00071 #else /* BUILDING_MISC */
00072   #define EXPCL_MISC __declspec(dllimport)
00073   #define EXPTP_MISC extern
00074 #endif /* BUILDING_MISC */
00075 
00076 #else   /* !WIN32_VC */
00077 
00078 #define EXPCL_DTOOL
00079 #define EXPTP_DTOOL
00080 
00081 #define EXPCL_DTOOLCONFIG
00082 #define EXPTP_DTOOLCONFIG
00083 
00084 #define EXPCL_MISC
00085 #define EXPTP_MISC
00086 
00087 #endif  /* WIN32_VC */
00088 
00089 #endif

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