ESA JPIP server  0.1
AppConfig Class Reference

Contains the configuration parameters of the application. More...

#include <app_config.h>

Collaboration diagram for AppConfig:

Public Member Functions

 AppConfig ()
 Initializes the object with zero and empty values. More...
 
bool Load (const char *file_name)
 Loads the parameters from a configuration file. More...
 
int port () const
 Returns the listening port. More...
 
string address () const
 Returns the listening address. More...
 
string images_folder () const
 Returns the folder of the images. More...
 
string caching_folder () const
 Returns the folder used for caching. More...
 
string logging_folder () const
 Returns the folder used for the logging files. More...
 
int max_chunk_size () const
 Returns the maximum chunk size. More...
 
int max_connections () const
 Returns the maximum number of connections. More...
 
bool logging () const
 Returns true if the logging messages are allowed. More...
 
bool log_requests () const
 Returns true if the client requests are logged. More...
 
int com_time_out () const
 Returns the connection time-out. More...
 
int cache_max_time () const
 Returns the maximum time for the cache files in seconds. More...
 
virtual ~AppConfig ()
 

Private Attributes

int port_
 Listening port. More...
 
int logging_
 true if logs messages are allowed More...
 
int log_requests_
 true if the client requests are logged More...
 
string address_
 Listening address. More...
 
string images_folder_
 Directory for the images. More...
 
string caching_folder_
 Directory for the caching files. More...
 
string logging_folder_
 Directory for the logging files. More...
 
int max_chunk_size_
 Maximum chunk size. More...
 
int max_connections_
 Maximum number of connections. More...
 
int com_time_out_
 Connection time-out. More...
 
int cache_max_time_
 Maximum time for the cache files. More...
 

Friends

ostream & operator<< (ostream &out, const AppConfig &cfg)
 

Detailed Description

Contains the configuration parameters of the application.

It is possible to load these parameters from a configuration file. This class can be printed.

Constructor & Destructor Documentation

AppConfig::AppConfig ( )
inline

Initializes the object with zero and empty values.

virtual AppConfig::~AppConfig ( )
inlinevirtual

Member Function Documentation

string AppConfig::address ( ) const
inline

Returns the listening address.

Here is the caller graph for this function:

int AppConfig::cache_max_time ( ) const
inline

Returns the maximum time for the cache files in seconds.

Here is the caller graph for this function:

string AppConfig::caching_folder ( ) const
inline

Returns the folder used for caching.

Here is the caller graph for this function:

int AppConfig::com_time_out ( ) const
inline

Returns the connection time-out.

Here is the caller graph for this function:

string AppConfig::images_folder ( ) const
inline

Returns the folder of the images.

Here is the caller graph for this function:

bool AppConfig::Load ( const char *  file_name)

Loads the parameters from a configuration file.

Parameters
file_nameConfiguration file.
Returns
true if successful.

Here is the caller graph for this function:

bool AppConfig::log_requests ( ) const
inline

Returns true if the client requests are logged.

Here is the caller graph for this function:

bool AppConfig::logging ( ) const
inline

Returns true if the logging messages are allowed.

Here is the caller graph for this function:

string AppConfig::logging_folder ( ) const
inline

Returns the folder used for the logging files.

Here is the caller graph for this function:

int AppConfig::max_chunk_size ( ) const
inline

Returns the maximum chunk size.

Here is the caller graph for this function:

int AppConfig::max_connections ( ) const
inline

Returns the maximum number of connections.

Here is the caller graph for this function:

int AppConfig::port ( ) const
inline

Returns the listening port.

Here is the caller graph for this function:

Friends And Related Function Documentation

ostream& operator<< ( ostream &  out,
const AppConfig cfg 
)
friend

Member Data Documentation

string AppConfig::address_
private

Listening address.

int AppConfig::cache_max_time_
private

Maximum time for the cache files.

string AppConfig::caching_folder_
private

Directory for the caching files.

int AppConfig::com_time_out_
private

Connection time-out.

string AppConfig::images_folder_
private

Directory for the images.

int AppConfig::log_requests_
private

true if the client requests are logged

int AppConfig::logging_
private

true if logs messages are allowed

string AppConfig::logging_folder_
private

Directory for the logging files.

int AppConfig::max_chunk_size_
private

Maximum chunk size.

int AppConfig::max_connections_
private

Maximum number of connections.

int AppConfig::port_
private

Listening port.


The documentation for this class was generated from the following files: