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

osgEarth::Symbology::Resource Class Reference

Inheritance diagram for osgEarth::Symbology::Resource:
Collaboration diagram for osgEarth::Symbology::Resource:

List of all members.

Public Member Functions

std::string & name ()
const std::string & name () const
virtual Config getConfig () const
void mergeConfig (const Config &conf)

Protected Member Functions

 Resource (const Config &config=Config())

Private Attributes

std::string _name

Detailed Description

Base class for a Resource, which is an external data element managed by a ResourceLibrary.

Definition at line 33 of file Resource.


Constructor & Destructor Documentation

Resource::Resource ( const Config config = Config()) [protected]

Definition at line 25 of file Resource.cpp.

{
    mergeConfig( conf );
}

Member Function Documentation

Config Resource::getConfig ( ) const [virtual]

Reimplemented in osgEarth::Symbology::MarkerResource, and osgEarth::Symbology::SkinResource.

Definition at line 39 of file Resource.cpp.

{
    Config conf( "resource" );
    conf.attr( "name" ) = _name;

    std::string tags = tagString();
    if ( !tags.empty() )
        conf.add( "tags", tags );

    return conf;
}

Here is the call graph for this function:

void Resource::mergeConfig ( const Config conf)

Reimplemented in osgEarth::Symbology::MarkerResource, and osgEarth::Symbology::SkinResource.

Definition at line 31 of file Resource.cpp.

{
    _name = conf.attr( "name" );

    addTags( conf.value("tags") );
}

Here is the call graph for this function:

std::string& osgEarth::Symbology::Resource::name ( ) [inline]

Readable name of the resource.

Definition at line 41 of file Resource.

{ return _name; }

Here is the caller graph for this function:

const std::string& osgEarth::Symbology::Resource::name ( ) const [inline]

Definition at line 42 of file Resource.

{ return _name; }

Member Data Documentation

std::string osgEarth::Symbology::Resource::_name [private]

Definition at line 50 of file Resource.


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