Commit adb8e8e6 authored by Jan Möbius's avatar Jan Möbius
Browse files

Tobias: Documentation update for splats

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14991 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 87e9889f
......@@ -73,21 +73,21 @@ const SplatCloud::SelectionsHandle SplatCloud::SELECTIONS_HANDLE( "<Selections>"
void SplatCloud::copySplatProperties( const SplatCloud &_splatCloud )
{
// deep copy all splat-properties
SplatProperties::const_iterator splatPropertyIter;
SplatPropertyMap::const_iterator splatPropertyIter;
for( splatPropertyIter = _splatCloud.splatProperties_.begin(); splatPropertyIter != _splatCloud.splatProperties_.end(); ++splatPropertyIter )
{
// create new deep copy of current splat-property
SplatPropertyInterface *prop = splatPropertyIter->second->clone();
SplatPropertyInterface *prop = splatPropertyIter->second.property_->clone();
// check if out of memory
if( prop == 0 )
{
std::cerr << "Out of memory for a copy of SplatCloud's Splat-Property \"" << splatPropertyIter->first << "\"." << std::endl;
std::cerr << "Out of memory for a copy of SplatCloud's splat-property \"" << splatPropertyIter->first << "\"." << std::endl;
continue;
}
// insert new copy into splat-property map with same name as before
splatProperties_[ splatPropertyIter->first ] = prop;
// insert new property map entry into splat-property map with same name as before
splatProperties_[ splatPropertyIter->first ] = SplatPropertyMapEntry( prop, splatPropertyIter->second.numRequests_ );
}
// Get pointers to predefined splat-properties.
......@@ -103,21 +103,21 @@ void SplatCloud::copySplatProperties( const SplatCloud &_splatCloud )
void SplatCloud::copyCloudProperties( const SplatCloud &_splatCloud )
{
// deep copy all cloud-properties
CloudProperties::const_iterator cloudPropertyIter;
CloudPropertyMap::const_iterator cloudPropertyIter;
for( cloudPropertyIter = _splatCloud.cloudProperties_.begin(); cloudPropertyIter != _splatCloud.cloudProperties_.end(); ++cloudPropertyIter )
{
// create new deep copy of current cloud-property
CloudPropertyInterface *prop = cloudPropertyIter->second->clone();
CloudPropertyInterface *prop = cloudPropertyIter->second.property_->clone();
// check if out of memory
if( prop == 0 )
{
std::cerr << "Out of memory for a copy of SplatCloud's Cloud-Property \"" << cloudPropertyIter->first << "\"." << std::endl;
std::cerr << "Out of memory for a copy of SplatCloud's cloud-property \"" << cloudPropertyIter->first << "\"." << std::endl;
continue;
}
// insert new copy into cloud-property map with same name as before
cloudProperties_[ cloudPropertyIter->first ] = prop;
// insert new property map entry into cloud-property map with same name as before
cloudProperties_[ cloudPropertyIter->first ] = CloudPropertyMapEntry( prop, cloudPropertyIter->second.numRequests_ );
}
// Get pointers to predefined cloud-properties.
......@@ -147,12 +147,12 @@ SplatCloud::SplatCloud( const SplatCloud &_splatCloud )
void SplatCloud::clearSplatProperties()
{
// free memory of all splat-properties
SplatProperties::const_iterator splatPropertyIter;
SplatPropertyMap::const_iterator splatPropertyIter;
for( splatPropertyIter = splatProperties_.begin(); splatPropertyIter != splatProperties_.end(); ++splatPropertyIter )
delete splatPropertyIter->second;
delete splatPropertyIter->second.property_;
// clear splat-property map
SplatProperties().swap( splatProperties_ );
SplatPropertyMap().swap( splatProperties_ );
// reset pointers to predefined splat-properties
resetPredefinedSplatPropertyPointers();
......@@ -165,12 +165,12 @@ void SplatCloud::clearSplatProperties()
void SplatCloud::clearCloudProperties()
{
// free memory of all cloud-properties
CloudProperties::const_iterator cloudPropertyIter;
CloudPropertyMap::const_iterator cloudPropertyIter;
for( cloudPropertyIter = cloudProperties_.begin(); cloudPropertyIter != cloudProperties_.end(); ++cloudPropertyIter )
delete cloudPropertyIter->second;
delete cloudPropertyIter->second.property_;
// clear cloud-property map
CloudProperties().swap( cloudProperties_ );
CloudPropertyMap().swap( cloudProperties_ );
// reset pointers to predefined cloud-properties
resetPredefinedCloudPropertyPointers();
......@@ -215,9 +215,9 @@ void SplatCloud::swap( SplatCloud &_splatCloud )
void SplatCloud::clearSplats()
{
// clear data vector of all splat-properties
SplatProperties::const_iterator splatPropertyIter;
SplatPropertyMap::const_iterator splatPropertyIter;
for( splatPropertyIter = splatProperties_.begin(); splatPropertyIter != splatProperties_.end(); ++splatPropertyIter )
splatPropertyIter->second->clear();
splatPropertyIter->second.property_->clear();
// reset number of splats
numSplats_ = 0;
......@@ -230,9 +230,9 @@ void SplatCloud::clearSplats()
void SplatCloud::pushbackSplat()
{
// add one element at end of data vector of all splat-properties
SplatProperties::const_iterator splatPropertyIter;
SplatPropertyMap::const_iterator splatPropertyIter;
for( splatPropertyIter = splatProperties_.begin(); splatPropertyIter != splatProperties_.end(); ++splatPropertyIter )
splatPropertyIter->second->pushback();
splatPropertyIter->second.property_->pushback();
// increase number of splats
++numSplats_;
......@@ -245,9 +245,9 @@ void SplatCloud::pushbackSplat()
void SplatCloud::resizeSplats( unsigned int _num )
{
// resize data vector of all splat-properties
SplatProperties::const_iterator splatPropertyIter;
SplatPropertyMap::const_iterator splatPropertyIter;
for( splatPropertyIter = splatProperties_.begin(); splatPropertyIter != splatProperties_.end(); ++splatPropertyIter )
splatPropertyIter->second->resize( _num );
splatPropertyIter->second.property_->resize( _num );
// update number of splats
numSplats_ = _num;
......
......@@ -104,53 +104,64 @@ public:
/// Swap the content.
void swap( SplatCloud &_splatCloud );
//----------------
/** \brief Clear the data vector of all splat-properties.
*
* \note The number of splats will be updated accordingly.
*/
void clearSplats();
//----------------
/** \brief Add one element at the end of the data vector of all splat-properties.
*
* \note The number of splats will be updated accordingly.
*/
void pushbackSplat();
//----------------
/** \brief Resize the data vector of all splat-properties.
*
* \note The number of splats will be updated accordingly.
*
* @param _num The new size of the storage vector
* @param[in] _num The new size of all data vectors.
*/
void resizeSplats( unsigned int _num );
//----------------
/** \brief Delete the elements with given indices from the data vector of all splat-properties.
*
* -
* - Use std::vector<T2> / std::list<T2> / std::set<T2> / ... for T and int / unsigned int / ... for T2.
* Use std::vector<T2> / std::list<T2> / std::set<T2> / ... for T and int / unsigned int / ... for T2.
*
* \note The number of splats will be updated accordingly.
*
* @param _indices Index of the splats to be erased
* @return The number of deleted elements.
* @param[in] _indices Indices of the elements to be erased.
* @return Returns the number of deleted elements.
*/
template <typename T> unsigned int eraseSplatsByIndex( const T &_indices );
//----------------
/** \brief Delete the elements with flag != 0 from the data vector of all splat-properties.
*
* Use bool / unsigned char / ... for T.
*
* \note _flags.size() has to be equal to numSplats().
* _flags.size() has to be equal to numSplats().
*
* \note The number of splats will be updated accordingly.
*
* @param _indices Index of the splats to be erased
* @param[in] _flags Vector of flag bits, one for each element.
* @return Returns the number of deleted elements.
*/
template <typename T> unsigned int eraseSplatsByFlag( const std::vector<T> &_flags );
//----------------
/** \brief Get the number of splats.
*
* @return Number of splats
* @return Returns the number of splats.
*/
inline unsigned int numSplats() const { return numSplats_; }
......@@ -163,6 +174,8 @@ private:
//----------------------------------------------------------------
// +------------------------+
// | |
// | General Properties |
......@@ -173,95 +186,114 @@ private:
public:
/// Base class for all Property-Handles
/** Base class for all property-handles */
typedef std::string BasePropertyHandle;
//----------------
/** Interface for all Splat-Properties
*
*/
/** Interface for all splat-properties */
class SplatPropertyInterface
{
friend class SplatCloud; /// Let class SplatCloud access methods like clone().
friend class SplatCloud; //!< Let class SplatCloud access methods like clone().
public:
virtual size_t sizeOf() const = 0; //!< Get the size of type.
virtual const std::type_info &typeInfo() const = 0; //!< Get the runtime type information.
virtual size_t sizeOf() const = 0; //!< Get the size of type.
virtual const std::type_info &typeId() const = 0; //!< Get the runtime type information.
private:
virtual inline ~SplatPropertyInterface() { } //!< Destructor
virtual SplatPropertyInterface *clone() const = 0; //!< Return a deep copy of this.
virtual inline ~SplatPropertyInterface() { } //!< Destructor
virtual SplatPropertyInterface *clone() const = 0; //!< Return a deep copy of this.
virtual void clear() = 0; //!< Clear the data vector.
virtual void pushback() = 0; //!< Add one element at the end of the data vector.
virtual void resize( unsigned int _num ) = 0; //!< Resize the data vector.
virtual void crop( const std::vector<int> &_indices ) = 0; //!< Keep only the elements with given indices in the data vector. The indices have to be valid, sorted and unique.
private:
void operator=( const SplatPropertyInterface & ); //!< Disallow the assign operator. (private and *not* implemented)
void operator=( const SplatPropertyInterface & ); //!< Disallow the assign operator. (private and *not* implemented)
};
//----------------
/** Interface for all Cloud-Properties
*
*/
/** Interface for all cloud-properties */
class CloudPropertyInterface
{
friend class SplatCloud; //!< Let class SplatCloud access methods like clone().
friend class SplatCloud; //!< Let class SplatCloud access methods like clone().
public:
virtual size_t sizeOf() const = 0; //!< Get the size of type.
virtual const std::type_info &typeInfo() const = 0; //!< Get the runtime type information.
virtual size_t sizeOf() const = 0; //!< Get the size of type.
virtual const std::type_info &typeId() const = 0; //!< Get the runtime type information.
private:
virtual inline ~CloudPropertyInterface() { } //!< Destructor
virtual CloudPropertyInterface *clone() const = 0; //!< Return a deep copy of this.
virtual inline ~CloudPropertyInterface() { } //!< Destructor
virtual CloudPropertyInterface *clone() const = 0; //!< Return a deep copy of this.
private:
void operator=( const CloudPropertyInterface & ); //!< Disallow the assign operator. (private and *not* implemented)
void operator=( const CloudPropertyInterface & ); //!< Disallow the assign operator. (private and *not* implemented)
};
//----------------
/** Splat-property map entry type */
class SplatPropertyMapEntry
{
public:
SplatPropertyMapEntry() { } //!< Standard constructor
SplatPropertyMapEntry( SplatPropertyInterface *_prop, unsigned int _num ) : property_( _prop ), numRequests_( _num ) { } //!< Constructor
public:
SplatPropertyInterface *property_; //!< A valid pointer to a splat-property
unsigned int numRequests_; //!< The number of times requestSplatProperty() was called and has not been released yet
};
//----------------
/// Splat-Property map type
typedef std::map<BasePropertyHandle, SplatPropertyInterface *> SplatProperties;
/** Cloud-property map entry type */
class CloudPropertyMapEntry
{
public:
CloudPropertyMapEntry() { } //!< Standard constructor
CloudPropertyMapEntry( CloudPropertyInterface *_prop, unsigned int _num ) : property_( _prop ), numRequests_( _num ) { } //!< Constructor
public:
CloudPropertyInterface *property_; //!< A valid pointer to a cloud-property
unsigned int numRequests_; //!< The number of times requestCloudProperty() was called and has not been released yet
};
//----------------
/// Cloud-Property map type
typedef std::map<BasePropertyHandle, CloudPropertyInterface *> CloudProperties;
/** Splat-property map type */
typedef std::map<BasePropertyHandle, SplatPropertyMapEntry> SplatPropertyMap;
//----------------
/** Cloud-property map type */
typedef std::map<BasePropertyHandle, CloudPropertyMapEntry> CloudPropertyMap;
//----------------
public:
/** Type specific class for Property-Handles
*
*/
/** Type specific class for property-handles */
template <typename T>
class PropertyHandleT : public BasePropertyHandle
{
public:
explicit inline PropertyHandleT<T>( const BasePropertyHandle &_handle ) : BasePropertyHandle( _handle ) { } /// Standard constructor
explicit inline PropertyHandleT<T>( const BasePropertyHandle &_handle ) : BasePropertyHandle( _handle ) { } //!< Constructor
};
//----------------
/** Type specific class for Splat-Properties
*
*/
/** Type specific class for splat-properties */
template <typename T>
class SplatPropertyT : public SplatPropertyInterface
{
friend class SplatCloud; //!< Let class SplatCloud access methods like clone().
public:
typedef T Value; //!< Value type
typedef typename std::vector<T>:: reference Reference; //!< These are references to T, *not* to SplatPropertyT<T>.
typedef typename std::vector<T>::const_reference ConstReference; //!< These are used because a std::vector<bool>::reference is *not* the same as a reference to bool.
public:
explicit inline SplatPropertyT<T>( const PropertyHandleT<T> &_handle, unsigned int _num ) : data_( _num ) { } //!< Standard constructor
inline SplatPropertyT<T>( const SplatPropertyT<T> &_property ) { data_ = _property.data_; } //!< Copy constructor
explicit inline SplatPropertyT<T>( const PropertyHandleT<T> &_handle, unsigned int _num ) : data_( _num ) { } //!< Constructor
inline SplatPropertyT<T>( const SplatPropertyT<T> &_property ) { data_ = _property.data_; } //!< Copy constructor
inline Reference data( int _idx ) { return data_[ _idx ]; } //!< Access the data as reference.
inline ConstReference data( int _idx ) const { return data_[ _idx ]; } //!< Access the data as const reference.
public:
virtual inline size_t sizeOf() const { return sizeof( T ); } //!< Get the size of type.
virtual inline const std::type_info &typeInfo() const { return typeid( T ); } //!< Get the runtime type information.
virtual inline size_t sizeOf() const { return sizeof( T ); } //!< Get the size of type.
virtual inline const std::type_info &typeId() const { return typeid( T ); } //!< Get the runtime type information.
private:
virtual inline ~SplatPropertyT<T>() { } //!< Destructor
virtual inline ~SplatPropertyT<T>() { } //!< Destructor
virtual inline SplatPropertyT<T> *clone() const { return new SplatPropertyT<T>( *this ); } //!< Return a deep copy of this.
virtual inline void clear() { std::vector<T>().swap( data_ ); } //!< Clear the data vector.
virtual inline void pushback() { data_.push_back( T() ); } //!< Add one element at the end of the data vector.
......@@ -270,31 +302,30 @@ public:
private:
void operator=( const SplatPropertyT<T> & ); //!< Disallow the assign operator. (private and *not* implemented)
private:
std::vector<T> data_; //!< The actual stored data (one entry per splat)
std::vector<T> data_; //!< The actual stored data (one element per splat)
};
//----------------
/** Type specific class for Cloud-Properties
*
*/
/** Type specific class for cloud-properties */
template <typename T>
class CloudPropertyT : public CloudPropertyInterface
{
friend class SplatCloud; //!< Let class SplatCloud access methods like clone().
public:
typedef T Value; //!< Value type
typedef T & Reference; //!< These are references to T, *not* to CloudPropertyT<T>.
typedef const T & ConstReference; //!< These are used only out of a consistency reason to the class SplatPropertyT<T>.
public:
explicit inline CloudPropertyT<T>( const PropertyHandleT<T> &_handle ) { } //!< Standard constructor
inline CloudPropertyT<T>( const CloudPropertyT<T> &_property ) { data_ = _property.data_; } //!< Copy constructor
explicit inline CloudPropertyT<T>( const PropertyHandleT<T> &_handle ) { } //!< Constructor
inline CloudPropertyT<T>( const CloudPropertyT<T> &_property ) { data_ = _property.data_; } //!< Copy constructor
inline Reference data() { return data_; } //!< Access the data as reference.
inline ConstReference data() const { return data_; } //!< Access the data as const reference.
public:
virtual inline size_t sizeOf() const { return sizeof( T ); } //!< Get the size of type.
virtual inline const std::type_info &typeInfo() const { return typeid( T ); } //!< Get the runtime type information.
virtual inline size_t sizeOf() const { return sizeof( T ); } //!< Get the size of type.
virtual inline const std::type_info &typeId() const { return typeid( T ); } //!< Get the runtime type information.
private:
virtual inline ~CloudPropertyT<T>() { } //!< Destructor
virtual inline ~CloudPropertyT<T>() { } //!< Destructor
virtual inline CloudPropertyT<T> *clone() const { return new CloudPropertyT<T>( *this ); } //!< Return a deep copy of this.
private:
void operator=( const CloudPropertyT<T> & ); //!< Disallow the assign operator. (private and *not* implemented)
......@@ -306,76 +337,160 @@ public:
public:
/// Clear Splat-Properties.
/// Clear all splat-properties.
void clearSplatProperties();
/// Clear Cloud-Properties.
/// Clear all cloud-properties.
void clearCloudProperties();
/** \brief Add a new property
* Add a new property. If the property is already present nothing is done.
* - Do *not* use handle-strings containing '<' and '>'. These are reserved for predefined properties.
* - For pointer versions:
* If the property is already present the pointer is set to the old property and no new property is created or added.
* If the property is *not* already present the pointer is set to the newly created property.
* If the creation fails the pointer is set to 0 and no new property is added.
* - For convenience the success is returned. This is the same as checking for pointer != 0, but
* - be careful, these methods are *not* in O(1). This is the reason why there is no method returning a pointer directly.
* - Do *not* misuse one of these methods as a has<Splat|Cloud>Property( handle ) method multiple times.
* Instead call the <add|get><Splat|Cloud>Property( handle, property ) method once and then check for property != 0 multiple times if needed.
* - The standard constructor of T is required.
//----------------
/** @name Request properties. */
///@{
/** \brief Request a new property.
*
* Adds the new property if *not* already present. Otherwise nothing is added.
*
* \note Be careful, this method is *not* in O(1).
*
* @param[in] _handle A handle of the desired property.
* Do *not* use handle-strings inbetween '<' and '>'. These are reserved for predefined properties.
* @param[out] _property A pointer to the new property.
* If the property is already present, the pointer is set to the old property and no new property is created or added.
* Otherwise the pointer is set to the newly created property.
* If the creation fails, the pointer is set to 0 and no new property is added.
* @return For convenience the validity of _property is returned (i.e. _property != 0).
*/
template <typename T> inline bool addSplatProperty( const PropertyHandleT<T> &_handle ) { SplatPropertyT<T> *temp; return addSplatProperty( _handle, temp ); }
template <typename T> inline bool addCloudProperty( const PropertyHandleT<T> &_handle ) { CloudPropertyT<T> *temp; return addCloudProperty( _handle, temp ); }
template <typename T> bool addSplatProperty( const PropertyHandleT<T> &_handle, SplatPropertyT<T> *(&_property) ); // no separate methods for const pointers
template <typename T> bool addCloudProperty( const PropertyHandleT<T> &_handle, CloudPropertyT<T> *(&_property) ); // because methods are not const anyway
/** This is equivalent to the addCloudProperty( handle ) method above but sets the property's data for convenience.
* - Notice that the data is set (overwritten) either if the property is already present or not.
* - The standard constructor and assign operator of T are required.
///@{
template <typename T> inline bool requestSplatProperty( const PropertyHandleT<T> &_handle ) { SplatPropertyT<T> *temp; return requestSplatProperty( _handle, temp ); }
template <typename T> inline bool requestCloudProperty( const PropertyHandleT<T> &_handle ) { CloudPropertyT<T> *temp; return requestCloudProperty( _handle, temp ); }
template <typename T> bool requestSplatProperty( const PropertyHandleT<T> &_handle, SplatPropertyT<T> *(&_property) ); // no separate methods for const pointers
template <typename T> bool requestCloudProperty( const PropertyHandleT<T> &_handle, CloudPropertyT<T> *(&_property) ); // because methods are not const anyway
///@}
///@}
//----------------
/** @name Request and set splat-properties. */
///@{
/** \brief Request and set a cloud-property.
*
* This is equivalent to the single parameter version of the requestCloudProperty() method but sets the property's data for convenience.
* Notice that the data is set (overwritten) either if the property is already present or not.
*
* \note Be careful, this method is *not* in O(1).
*
* @param[in] _handle A handle of the desired property.
* Do *not* use handle-strings inbetween '<' and '>'. These are reserved for predefined properties.
* @param[in] _data The new data value.
* @return For convenience the validity of _property is returned (i.e. _property != 0).
*/
template <typename T> inline bool addCloudProperty( const PropertyHandleT<T> &_handle, const T &_data )
{ CloudPropertyT<T> *prop; if( addCloudProperty( _handle, prop ) ) { prop->data() = _data; return true; } return false; }
template <typename T> inline bool requestCloudProperty( const PropertyHandleT<T> &_handle, const T &_data )
{ CloudPropertyT<T> *prop; if( requestCloudProperty( _handle, prop ) ) { prop->data() = _data; return true; } return false; }
///@}
//----------------
/** Remove a property. If the property is *not* present nothing is done.
* - Do *not* use handle-strings containing '<' and '>'. These are reserved for predefined properties.
/** @name Release properties. */
///@{
/** \brief Release a property.
*
* Removes the property if present. Otherwise nothing is removed.
*
* \note Be careful, this method is *not* in O(1).
*
* @param[in] _handle A handle of the property to remove.
* Do *not* use handle-strings inbetween '<' and '>'. These are reserved for predefined properties.
* @param[out] _property A pointer to the old property.
* If the property is present and will *not* be removed, the pointer is set to the old property.
* Otherwise the pointer is set to 0.
* @return For convenience the validity of _property is returned (i.e. _property != 0).
*/
template <typename T> void removeSplatProperty( const PropertyHandleT<T> &_handle );
template <typename T> void removeCloudProperty( const PropertyHandleT<T> &_handle );
///@{
template <typename T> inline bool releaseSplatProperty( const PropertyHandleT<T> &_handle ) { SplatPropertyT<T> *temp; return releaseSplatProperty( _handle, temp ); }
template <typename T> inline bool releaseCloudProperty( const PropertyHandleT<T> &_handle ) { CloudPropertyT<T> *temp; return releaseCloudProperty( _handle, temp ); }
template <typename T> bool releaseSplatProperty( const PropertyHandleT<T> &_handle, SplatPropertyT<T> *(&_property) );
template <typename T> bool releaseCloudProperty( const PropertyHandleT<T> &_handle, CloudPropertyT<T> *(&_property) );
///@}
/** Get a pointer to a property. If the property is *not* present the pointer is set to 0.
* - Be careful, these methods are *not* in O(1). This is the reason why there is no method returning a pointer directly.
///@}
//----------------
/** @name Get properties. */
///@{
/** \brief Get a pointer to a property.
*
* \note Be careful, this method is *not* in O(1).
* This is the reason why there is no method returning a pointer directly and no hasSplatProperty() or hasCloudProperty() method.
* If you want to check for existence, use the dual parameter version of the getSplatProperty() or getCloudProperty() method once
* and then check for _property != 0 multiple times if needed.
*
* @param[in] _handle A handle of the desired property.
* @param[out] _property A pointer to the property.
* If the property is present, the pointer is set to the property.
* Otherwise the pointer is set to 0.
*/
///@{
template <typename T> void getSplatProperty( const PropertyHandleT<T> &_handle, SplatPropertyT<T> *(&_property) );
template <typename T> void getSplatProperty( const PropertyHandleT<T> &_handle, const SplatPropertyT<T> *(&_property) ) const;
template <typename T> void getCloudProperty( const PropertyHandleT<T> &_handle, CloudPropertyT<T> *(&_property) );
template <typename T> void getCloudProperty( const PropertyHandleT<T> &_handle, const CloudPropertyT<T> *(&_property) ) const;
///@}
///@}
//----------------
/** Get all Splat- or Cloud-Properties.
* - Be careful, the count( handle ) method will *not* check for the appropiate type of a property.
* - There is no has<Splat|Cloud>Property( handle ) method because this would *not* be in O(1).
* Instead call the get<Splat|Cloud>Property( handle, property ) method once and then check for property != 0 multiple times if needed.
/** @name Get property maps. */
///@{
/** \brief Get all splat- or cloud-properties.
*
* \note Be careful, std::map's count() method will *not* check for the appropiate type of a property.
* There is no hasSplatProperty() or hasCloudProperty() method because this would *not* be in O(1).
* Instead call the dual parameter version of the getSplatProperty() or getCloudProperty() method once
* and then check for _property != 0 multiple times if needed.
*
* @return Returns the property map as read-only reference.
*/
inline const SplatProperties &splatProperties() const { return splatProperties_; }
inline const CloudProperties &cloudProperties() const { return cloudProperties_; }
///@{
inline const SplatPropertyMap &splatProperties() const { return splatProperties_; }
inline const CloudPropertyMap &cloudProperties() const { return cloudProperties_; }
///@}
///@}
//----------------
private:
/// Deep copy Splat- or Cloud-Properties.
/// Deep copy all splat-properties.
void copySplatProperties( const SplatCloud &_splatCloud );
/// Deep copy all cloud-properties.
void copyCloudProperties( const SplatCloud &_splatCloud );
// == MEMBERS =====================================================
private:
/// Splat-Property map
SplatProperties splatProperties_;
/// Cloud-Property map
CloudProperties cloudProperties_;
/// Splat-property map
SplatPropertyMap splatProperties_;
/// Cloud-property map
CloudPropertyMap cloudProperties_;
//----------------------------------------------------------------