fw4spl
fwRuntime::BundleElement Struct Reference

Implements the base class for all element managed by a bundle. More...

#include <BundleElement.hpp>

+ Inheritance diagram for fwRuntime::BundleElement:

Public Member Functions

FWRUNTIME_API std::shared_ptr< BundlegetBundle () const
 Retrieves the bundle that owns the extension. More...
 
FWRUNTIME_API bool isEnable () const
 Tells if the element is enabled or not. More...
 
FWRUNTIME_API void setEnable (const bool enable)
 Set if the element is enabled or not. More...
 

Protected Member Functions

 BundleElement ()
 Constructor. More...
 
 BundleElement (std::shared_ptr< Bundle > bundle)
 Constructor. More...
 

Detailed Description

Implements the base class for all element managed by a bundle.

Definition at line 24 of file BundleElement.hpp.

Constructor & Destructor Documentation

fwRuntime::BundleElement::BundleElement ( )
protected

Constructor.

Remarks
The instance will try to guess the bundle that is being loaded and consider that bundle as its owning bundle
Postcondition
The bundle isn't null.
See also
fwRuntime::Bundle::getLoadingBundle()

Definition at line 14 of file BundleElement.cpp.

References SLM_ASSERT.

fwRuntime::BundleElement::BundleElement ( std::shared_ptr< Bundle bundle)
protected

Constructor.

Postcondition
The bundle isn't null.
Parameters
[in]bundlea shared pointer to the managing bundle

Definition at line 24 of file BundleElement.cpp.

References SLM_ASSERT.

Member Function Documentation

std::shared_ptr< Bundle > fwRuntime::BundleElement::getBundle ( ) const

Retrieves the bundle that owns the extension.

Returns
a pointer to a bundle instance

Definition at line 34 of file BundleElement.cpp.

Referenced by fwRuntime::ExtensionPoint::getExtensionValidator(), fwActivities::registry::Activities::parseBundleInformation(), and fwRuntime::Extension::validate().

+ Here is the caller graph for this function:

bool fwRuntime::BundleElement::isEnable ( ) const

Tells if the element is enabled or not.

Remarks
The element will asks its bundle enable state. if the bundle element is enabled then the program verifies if the bundle element is enabled too.
Precondition
The bundle must not be null.
Returns
true or false

Definition at line 41 of file BundleElement.cpp.

References SLM_ASSERT.

void fwRuntime::BundleElement::setEnable ( const bool  enable)

Set if the element is enabled or not.

See also
isEnable
Parameters
[in]enableTo know if bundle element is enabled

Definition at line 50 of file BundleElement.cpp.


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