OTPNitro
 All Classes Files Functions Variables Macros
Public Member Functions | List of all members
Config Class Reference

Configuration, path and pages management. More...

#include <config.h>

Public Member Functions

 Config (void)
 Config constructor. More...
 
int getChars ()
 Returns the max PATH length. More...
 
int getPages ()
 Returns the number of generated pages. More...
 
char * getPath ()
 Returns the current PATH. More...
 
void setChars (int)
 Set the max PATH length. More...
 
void setPages (int)
 Set the num of pages to be generated. More...
 
void setPath (char *)
 Set a new PATH to be used. More...
 
void saveConfig ()
 Save the config to the default PATH
If the config file doesnt exist it will create it with default values. More...
 

Detailed Description

Configuration, path and pages management.

Constructor & Destructor Documentation

Config::Config ( void  )

Config constructor.

Returns
Config object

Default PATH
Win32: The PATH is %APPDATA%\.otpnitro\
Unix: The PATH is $HOME/.otpnitro/

Files
The config file is always otpnitro.ini in the PATH root.
The pages are stored on the PAGES folder from the PATH root.

Member Function Documentation

int Config::getChars ( )

Returns the max PATH length.

Returns
MAX_CHARS
int Config::getPages ( )

Returns the number of generated pages.

Returns
MAX_PAGES
char * Config::getPath ( )

Returns the current PATH.

void Config::saveConfig ( void  )

Save the config to the default PATH
If the config file doesnt exist it will create it with default values.

void Config::setChars ( int  chars)

Set the max PATH length.

Parameters
charsMAX_CHARS (int)
void Config::setPages ( int  pages)

Set the num of pages to be generated.

Parameters
pagesMAX_PAGES (int)
void Config::setPath ( char *  path)

Set a new PATH to be used.


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