GPU-Accelerated Coverage  0.1.0
Compute coverage tours for known environment with articulated objects on GPU
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
gpu_coverage::Config Class Reference

Singleton class for storing configuration. More...

#include <Config.h>

Classes

struct  AbstractParam
 Abstract class representing a configuration parameter. More...
 
struct  Param
 Configuration parameter. More...
 

Public Types

enum  PanoOutputValue {
  IMAGE_STRIP_HORIZONTAL, IMAGE_STRIP_VERTICAL, CUBE, EQUIRECTANGULAR,
  CYLINDRICAL
}
 Possible values for the panoOutputFormat parameter. More...
 

Public Member Functions

void save () const
 Save the configuration to disk.
 
void load ()
 Load the configuration from disk.
 
template<class T >
getParam (const std::string &name) const
 Get a configuration parameter. More...
 

Static Public Member Functions

static ConfiggetInstance ()
 
static void init (const int argc, const char *const argv[])
 

Protected Types

typedef std::map< std::string, AbstractParam * > Params
 Parameter map type, maps names to parameter structure.
 

Protected Member Functions

 Config (const std::string &filename)
 Protected constructor, loads configuration from file. More...
 
virtual ~Config ()
 Destructor.
 

Protected Attributes

const std::string filename
 The file name for loading and storing the configuration data.
 
Params params
 The parameters.
 

Static Protected Attributes

static Configinstance
 The singleton instance.
 

Friends

std::ostream & operator<< (std::ostream &os, AbstractParam &param)
 
std::istream & operator>> (std::istream &is, AbstractParam &param)
 

Detailed Description

Singleton class for storing configuration.

Member Enumeration Documentation

Possible values for the panoOutputFormat parameter.

Enumerator
IMAGE_STRIP_HORIZONTAL 

Six cube map sides aligned horizontally (right-left-top-bottom-back-front)

IMAGE_STRIP_VERTICAL 

Six cube map sides aligned vertically (right-left-top-bottom-back-front)

CUBE 

Cube sides folded onto a 4x3 grid.

EQUIRECTANGULAR 

Equirectangular projection image with aspect ratio 2:1.

CYLINDRICAL 

Cylindrical projection image with aspect ratio 2:1.

Constructor & Destructor Documentation

gpu_coverage::Config::Config ( const std::string &  filename)
protected

Protected constructor, loads configuration from file.

Parameters
[in]filenameName of the file for loading the configuration.

Member Function Documentation

static Config& gpu_coverage::Config::getInstance ( )
inlinestatic

Returns the singleton Config instance.

Returns
The Config instance.

Warning: This method does not create an instance. Call init() first to create the instance and load the configuration data.

template<class T >
T gpu_coverage::Config::getParam ( const std::string &  name) const
inline

Get a configuration parameter.

Parameters
[in]nameThe name of the configuration parameter.
Returns
The current value of the configuration parameter.
Exceptions
std::invalid_argumentParameter name is unknown or the parameter type mismatches the template parameter.

If the configuration parameter has not been set, the method returns its default value.

static void gpu_coverage::Config::init ( const int  argc,
const char *const  argv[] 
)
static

Create a Config instance and load the config data from a file.

Parameters
[in]argcCommand line argument count.
[in]argvCommand line arguments.

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