00001 // Filename: vector_src.cxx 00002 // Created by: drose (15May01) 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 //////////////////////////////////////////////////////////////////// 00020 // 00021 // This file defines the interface to declare and export from the DLL 00022 // an STL vector of some type. 00023 // 00024 // To use this file you must #define a number of symbols and then 00025 // #include it from a .cxx file. You also must do the same thing with 00026 // vector_something_src.h from a .h file. 00027 // 00028 // This is necessary because of the complexity involved in exporting a 00029 // vector class from a DLL. If we are using the Dinkumware STL 00030 // implementation, it is even more complex. However, all this 00031 // complexity is only needed to support Windows builds; Unix shared 00032 // libraries are able to export symbols (including templates) without 00033 // any special syntax. 00034 // 00035 //////////////////////////////////////////////////////////////////// 00036 00037 00038 // The following variables should be defined prior to including this 00039 // file: 00040 // 00041 // EXPCL - the appropriate EXPCL_* symbol for this DLL. 00042 // EXPTP - the appropriate EXPTP_* symbol for this DLL. 00043 // TYPE - the type of thing we are building a vector on. 00044 // NAME - The name of the resulting vector typedef, e.g. vector_int. 00045 // 00046 // They will automatically be undefined at the end of the file. 00047 00048 /* 00049 void 00050 insert_into_vector(NAME &vec, NAME::iterator where, 00051 NAME::const_pointer begin, NAME::const_pointer end) { 00052 vec.insert(where, begin, end); 00053 } 00054 */ 00055 00056 #undef EXPCL 00057 #undef EXPTP 00058 #undef TYPE 00059 #undef NAME