Panda3D
|
00001 // Filename: dconfig.I 00002 // Created by: cary (20Mar00) 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 00016 bool DConfig:: 00017 GetBool(const string &sym, bool def) { 00018 ConfigVariableBool var(sym, def, "DConfig", ConfigFlags::F_dconfig); 00019 return var.get_value(); 00020 } 00021 00022 int DConfig:: 00023 GetInt(const string &sym, int def) { 00024 ConfigVariableInt var(sym, def, "DConfig", ConfigFlags::F_dconfig); 00025 return var.get_value(); 00026 } 00027 00028 float DConfig:: 00029 GetFloat(const string &sym, float def) { 00030 ConfigVariableDouble var(sym, def, "DConfig", ConfigFlags::F_dconfig); 00031 return var.get_value(); 00032 } 00033 00034 double DConfig:: 00035 GetDouble(const string &sym, double def) { 00036 ConfigVariableDouble var(sym, def, "DConfig", ConfigFlags::F_dconfig); 00037 return var.get_value(); 00038 } 00039 00040 string DConfig:: 00041 GetString(const string &sym, const string &def) { 00042 ConfigVariableString var(sym, def, "DConfig", ConfigFlags::F_dconfig); 00043 return var.get_value(); 00044 }