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

CommonConfiguration.h

00001 
00010 #ifndef EDG_WORKLOAD_COMMON_CONFIGURATION_COMMONCONFIGURATION_H
00011 #define EDG_WORKLOAD_COMMON_CONFIGURATION_COMMONCONFIGURATION_H
00012 
00013 #include "confbase.h"
00014 
00015 COMMON_NAMESPACE_BEGIN {
00016 
00017 namespace configuration {
00018 
00019 class CommonConfiguration : public confbase_c {
00020 public:
00021   CommonConfiguration( const classad::ClassAd *ad );
00022 
00023   ~CommonConfiguration( void );
00024 
00025 
00026   inline std::string dguser( const std::string &def = "dguser" ) const
00027   {
00028     return this->getAndParseString( "DGUser", def );
00029   }
00030 
00031   inline std::string host_proxy_file( const std::string &def = "" ) const
00032   {
00033     return this->getAndParseFileName( "HostProxyFile", def );
00034   }
00035 
00036   inline bool use_cache_instead_of_gris( bool def = false ) const
00037   {
00038     return this->getBool( "UseCacheInsteadOfGris", def );
00039   }
00040 
00041   inline std::string log_file( const std::string &def = "" ) const
00042   {
00043     return this->getAndParseFileName( "LogFile", def );
00044   }
00045 
00046   inline std::string log_rotation_base_file( const std::string &def = "[[LogFile]]" ) const
00047   {
00048     return this->getAndParseFileName( "LogRotationBaseFile", def );
00049   }
00050 
00051   inline std::string lock_file( const std::string &def = "" ) const
00052   {
00053     return this->getAndParseFileName( "LockFile", def );
00054   }
00055 
00056   inline int log_level( int def = 0 ) const
00057   {
00058     return this->getInt( "LogLevel", def );
00059   }
00060 
00061   inline unsigned int log_rotation_max_file_number( unsigned int def = 5 ) const
00062   {
00063     return static_cast<unsigned int>( this->getInt( "LogRotationMaxFileNumber", def ) );
00064   }
00065 
00066   inline std::streamsize log_file_max_size( std::streamsize def = 100000000 ) const
00067   {
00068     return static_cast<std::streamsize>( this->getInt( "LogFileMaxSize", def ) );
00069   }
00070 
00071 };
00072 
00073 }; // Namespace configuration
00074 
00075 } COMMON_NAMESPACE_END;
00076 
00077 #endif /* EDG_WORKLOAD_COMMON_CONFIGURATION_COMMONCONFIGURATION_H */
00078 
00079 // Local Variables:
00080 // mode: c++
00081 // End:

Generated on Fri May 14 14:18:25 2004 for COMMON API - configuration, jobid, ldif2classadi, logger, process, requestad, socket++i, task, utilities by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002