osgEarth 2.1.1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

osgEarth::ProfileOptions Class Reference

Inheritance diagram for osgEarth::ProfileOptions:
Collaboration diagram for osgEarth::ProfileOptions:

List of all members.

Public Member Functions

 ProfileOptions (const ConfigOptions &options=ConfigOptions())
 ProfileOptions (const std::string &namedProfile)
bool defined () const
optional< std::string > & namedProfile ()
const optional< std::string > & namedProfile () const
optional< std::string > & srsString ()
const optional< std::string > & srsString () const
optional< std::string > & vsrsString ()
const optional< std::string > & vsrsString () const
optional< Bounds > & bounds ()
const optional< Bounds > & bounds () const
optional< int > & numTilesWideAtLod0 ()
const optional< int > & numTilesWideAtLod0 () const
optional< int > & numTilesHighAtLod0 ()
const optional< int > & numTilesHighAtLod0 () const
Config getConfig () const

Protected Member Functions

void mergeConfig (const Config &conf)

Private Member Functions

void fromConfig (const Config &conf)

Private Attributes

optional< std::string > _namedProfile
optional< std::string > _srsInitString
optional< std::string > _vsrsInitString
optional< Bounds_bounds
optional< int > _numTilesWideAtLod0
optional< int > _numTilesHighAtLod0

Detailed Description

Configuration options for initializing a Profile.

Definition at line 38 of file Profile.


Constructor & Destructor Documentation

ProfileOptions::ProfileOptions ( const ConfigOptions options = ConfigOptions())

Definition at line 35 of file Profile.cpp.

Here is the call graph for this function:

ProfileOptions::ProfileOptions ( const std::string &  namedProfile)

Definition at line 47 of file Profile.cpp.

Here is the call graph for this function:


Member Function Documentation

optional<Bounds>& osgEarth::ProfileOptions::bounds ( ) [inline]

Geospatial bounds for this profile's extent

Definition at line 62 of file Profile.

{ return _bounds; }

Here is the caller graph for this function:

const optional<Bounds>& osgEarth::ProfileOptions::bounds ( ) const [inline]

Definition at line 63 of file Profile.

{ return _bounds; }
bool ProfileOptions::defined ( ) const

Returns true if this configuration is well-defined and usable

Definition at line 107 of file Profile.cpp.

Here is the call graph for this function:

void ProfileOptions::fromConfig ( const Config conf) [private]

Definition at line 58 of file Profile.cpp.

{
    if ( !conf.value().empty() )
        _namedProfile = conf.value();

    conf.getIfSet( "srs", _srsInitString );
    conf.getIfSet( "vsrs", _vsrsInitString );

    if ( conf.hasValue( "xmin" ) && conf.hasValue( "ymin" ) && conf.hasValue( "xmax" ) && conf.hasValue( "ymax" ) )
    {
        _bounds = Bounds(
            conf.value<double>( "xmin", 0 ),
            conf.value<double>( "ymin", 0 ),
            conf.value<double>( "xmax", 0 ),
            conf.value<double>( "ymax", 0 ) );
    }

    conf.getIfSet( "num_tiles_wide_at_lod_0", _numTilesWideAtLod0 );
    conf.getIfSet( "num_tiles_high_at_lod_0", _numTilesHighAtLod0 );
}

Here is the call graph for this function:

Here is the caller graph for this function:

Config ProfileOptions::getConfig ( ) const [virtual]

Reimplemented from osgEarth::ConfigOptions.

Definition at line 80 of file Profile.cpp.

{
    Config conf( "profile" );
    if ( _namedProfile.isSet() )
    {
        conf.value() = _namedProfile.value();
    }
    else
    {
        conf.updateIfSet( "srs", _srsInitString );
        conf.updateIfSet( "vsrs", _vsrsInitString );

        if ( _bounds.isSet() )
        {
            conf.update( "xmin", toString(_bounds->xMin()) );
            conf.update( "ymin", toString(_bounds->yMin()) );
            conf.update( "xmax", toString(_bounds->xMax()) );
            conf.update( "ymax", toString(_bounds->yMax()) );
        }

        conf.updateIfSet( "num_tiles_wide_at_lod_0", _numTilesWideAtLod0 );
        conf.updateIfSet( "num_tiles_high_at_lod_0", _numTilesHighAtLod0 );
    }
    return conf;
}

Here is the call graph for this function:

void osgEarth::ProfileOptions::mergeConfig ( const Config conf) [inline, protected, virtual]

Reimplemented from osgEarth::ConfigOptions.

Definition at line 77 of file Profile.

                                               {
            ConfigOptions::mergeConfig( conf );
            fromConfig( conf );
        }

Here is the call graph for this function:

const optional<std::string>& osgEarth::ProfileOptions::namedProfile ( ) const [inline]

Definition at line 51 of file Profile.

{ return _namedProfile; }
optional<std::string>& osgEarth::ProfileOptions::namedProfile ( ) [inline]

Gets the optional Well-Known Profile string.

Definition at line 50 of file Profile.

{ return _namedProfile; }

Here is the caller graph for this function:

optional<int>& osgEarth::ProfileOptions::numTilesHighAtLod0 ( ) [inline]

Number of tiles on the Y axis at LOD 0

Definition at line 70 of file Profile.

{ return _numTilesHighAtLod0; }

Here is the caller graph for this function:

const optional<int>& osgEarth::ProfileOptions::numTilesHighAtLod0 ( ) const [inline]

Definition at line 71 of file Profile.

{ return _numTilesHighAtLod0; }
const optional<int>& osgEarth::ProfileOptions::numTilesWideAtLod0 ( ) const [inline]

Definition at line 67 of file Profile.

{ return _numTilesWideAtLod0; }
optional<int>& osgEarth::ProfileOptions::numTilesWideAtLod0 ( ) [inline]

Number of tiles in the X axis at LOD 0

Definition at line 66 of file Profile.

{ return _numTilesWideAtLod0; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::ProfileOptions::srsString ( ) const [inline]

Definition at line 55 of file Profile.

{ return _srsInitString; }
optional<std::string>& osgEarth::ProfileOptions::srsString ( ) [inline]

Gets the spatial reference system initialization string to use for the profile.

Definition at line 54 of file Profile.

{ return _srsInitString; }

Here is the caller graph for this function:

optional<std::string>& osgEarth::ProfileOptions::vsrsString ( ) [inline]

Gets the vertical spatial reference init string for this profile.

Definition at line 58 of file Profile.

{ return _vsrsInitString; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::ProfileOptions::vsrsString ( ) const [inline]

Definition at line 59 of file Profile.

{ return _vsrsInitString; }

Member Data Documentation

Definition at line 88 of file Profile.

Definition at line 85 of file Profile.

Definition at line 90 of file Profile.

Definition at line 89 of file Profile.

Definition at line 86 of file Profile.

Definition at line 87 of file Profile.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines