Panda3D
|
00001 // Filename: config_dtoolutil.cxx 00002 // Created by: drose (17Nov06) 00003 // 00004 //////////////////////////////////////////////////////////////////// 00005 // 00006 // PANDA 3D SOFTWARE 00007 // Copyright (c) Carnegie Mellon University. All rights reserved. 00008 // 00009 // All use of this software is subject to the terms of the revised BSD 00010 // license. You should have received a copy of this license along 00011 // with this source code in a file named "LICENSE." 00012 // 00013 //////////////////////////////////////////////////////////////////// 00014 00015 #include "config_dtoolutil.h" 00016 00017 #include "filename.h" 00018 #include "pandaSystem.h" 00019 00020 //////////////////////////////////////////////////////////////////// 00021 // Function: init_libdtoolutil 00022 // Description: Initializes the library. This must be called at 00023 // least once before any of the functions or classes in 00024 // this library can be used. Normally it will be 00025 // called by the static initializers and need not be 00026 // called explicitly, but special cases exist. 00027 //////////////////////////////////////////////////////////////////// 00028 void 00029 init_libdtoolutil() { 00030 static bool initialized = false; 00031 if (initialized) { 00032 return; 00033 } 00034 initialized = true; 00035 00036 Filename::init_type(); 00037 PandaSystem::init_type(); 00038 } 00039 00040 class InitDtoolutil { 00041 public: 00042 InitDtoolutil() { 00043 init_libdtoolutil(); 00044 } 00045 }; 00046 00047 static InitDtoolutil _init;