Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Param.hpp

Go to the documentation of this file.
00001 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
00002  * 
00003  * The Lemur toolkit for language modeling and information retrieval.
00004  * Copyright (c) 2001 Carnegie Mellon University.  All rights reserved.
00005  *
00006  * Redistribution and use in source and binary forms, with or without
00007  * modification, are permitted for research or educational purposes,
00008  * provided that this copyright notice is maintained and note is made
00009  * of any changes to the source code.
00010  * 
00011  * This is a research system.  The code is distributed on an "as is" basis,
00012  * without any warranty, express or implied. 
00013  * 
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
00015 
00016  ** 02/2005 -- dmf Rework to use indri Parameters.
00017  */
00018 
00019 #ifndef _ParamH_
00020 #define _ParamH_
00021 
00022 #include "lemur-platform.h"
00023 #include "String.hpp"
00024 
00025 // replace with #defines?
00026 namespace lemur 
00027 {
00028   namespace api
00029   {
00030     //  Get routines:
00032 
00037     lemur::utility::String ParamGetString(const lemur::utility::String &s, 
00038                                           const lemur::utility::String &def);
00040 
00046     lemur::utility::String ParamGetString(const lemur::utility::String &s, 
00047                                           lemur::utility::String &value, 
00048                                           const lemur::utility::String &def);
00053     lemur::utility::String ParamGetString(const lemur::utility::String &s);
00054 
00056 
00061     int    ParamGet(const lemur::utility::String &s, 
00062                     lemur::utility::String &value);
00063 
00065 
00071     int    ParamGet(const lemur::utility::String &s, 
00072                     lemur::utility::String &value, 
00073                     const lemur::utility::String &def);
00074 
00076 
00081     int    ParamGet(const lemur::utility::String &s, int &value);
00082 
00084 
00090     int    ParamGet(const lemur::utility::String &s, int &value, 
00091                     const int &def);
00092 
00094 
00099     int    ParamGet(const lemur::utility::String &s, double &value);
00100 
00102 
00108     int    ParamGet(const lemur::utility::String &s, double &value, 
00109                     const double &def);
00110 
00112 
00117     int    ParamGet(const lemur::utility::String &s, float &value);
00118 
00120 
00126     int    ParamGet(const lemur::utility::String &s, float &value, 
00127                     const float &def);
00128 
00130 
00135     int    ParamGetInt(const lemur::utility::String &s, int def);
00136 
00138 
00144     int    ParamGetBit(const lemur::utility::String &s, int def);
00145 
00147 
00152     double ParamGetDouble(const lemur::utility::String &s, double def);
00153 
00155 
00160     float  ParamGetFloat(const lemur::utility::String &s, float def);
00161 
00163 
00168     INT64  ParamGetLongLong(const lemur::utility::String &s, INT64 def);
00169 
00170     //  Miscellaneous:
00172 
00176     int    ParamPushFile (const lemur::utility::String &s);
00177 
00179 
00182     lemur::utility::String ParamPopFile (void);
00184     void   ParamDisplay();
00185 
00187     void   ParamClear();
00188 
00190 
00193     void ParamSet(const lemur::utility::String &key, 
00194                   const lemur::utility::String &value);
00195   }
00196 }
00197 
00198 #endif

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4