SignatureSet Class Reference

A container for multiple signatures. More...

#include <SignatureSet.h>

Inheritance diagram for SignatureSet:

Inheritance graph

List of all members.

Public Member Functions

virtual bool insertSignature (Signature *pSignature)=0
virtual bool insertSignatures (const std::vector< Signature * > &signatures)=0
virtual bool hasSignature (Signature *pSignature) const =0
virtual unsigned int getNumSignatures () const =0
virtual std::vector< Signature * > getSignatures () const =0
virtual bool removeSignature (Signature *pSignature, bool bDelete=false)=0
virtual bool removeSignatures (const std::vector< Signature * > &signatures, bool bDelete=false)=0
virtual void clear (bool bDelete=false)=0

Protected Member Functions

virtual ~SignatureSet ()


Detailed Description

A container for multiple signatures.

This class provides encapsulation for multiple signatures into a single object. The SignatureSet is also a type of signature, so it can contain metadata, a description, and acquisition values. Signatures can be inserted into and removed from the set.

When a SignatureSet is deleted, Signatures contained in the set are not automatically deleted unless the SignatureSet is an ancestor of the Signature.

This subclass of Subject will notify upon the following conditions:

See also:
Signature

Definition at line 34 of file SignatureSet.h.


Constructor & Destructor Documentation

virtual SignatureSet::~SignatureSet (  )  [protected, virtual]

This should be destroyed by calling ModelServices::destroyElement.

Definition at line 154 of file SignatureSet.h.


Member Function Documentation

virtual bool SignatureSet::insertSignature ( Signature pSignature  )  [pure virtual]

Adds an existing signature into the set.

Parameters:
pSignature The signature to add to the set.
Returns:
TRUE if the signature was successfully added to the set, otherwise FALSE.
Subject Notifications:
This method will notify Subject::signalModified.

Implemented in SignatureLibrary.

virtual bool SignatureSet::insertSignatures ( const std::vector< Signature * > &  signatures  )  [pure virtual]

Add several signatures to the set.

It is possible to add the same sig to the set multiple times.

This method adds several sigs to the set. If any of the sigs to add are NULL, the method will fail, having done nothing.

Parameters:
signatures A vector of signatures to add to the set
Returns:
true if the signatures were added, otherwise false.
Subject Notifications:
This method will notify Subject::signalModified after the sigs are done being added to the list. Only one notification will be done. No notification will be done if signatures is empty.

Implemented in SignatureLibrary.

virtual bool SignatureSet::hasSignature ( Signature pSignature  )  const [pure virtual]

Checks to see if a signature is in the set.

Parameters:
pSignature The signature to check for.
Returns:
true if the specified signature is in the set, otherwise false.

virtual unsigned int SignatureSet::getNumSignatures (  )  const [pure virtual]

Counts the signatures in the set.

Returns:
the number of signatures in the set.

virtual std::vector<Signature*> SignatureSet::getSignatures (  )  const [pure virtual]

Returns a vector of pointers to the signatures in the set.

Returns:
The vector of signature pointers.

virtual bool SignatureSet::removeSignature ( Signature pSignature,
bool  bDelete = false 
) [pure virtual]

Removed a signature from the set.

Parameters:
pSignature The signature to remove from the set.
bDelete TRUE if the signature should be deleted when removed from the set, otherwise FALSE.
Returns:
TRUE if the signature successfully removed from the set, otherwise FALSE. FALSE is also returned if the given signature does not exist in the set.
Subject Notifications:
This method will notify Subject::signalModified.

Implemented in SignatureLibrary.

virtual bool SignatureSet::removeSignatures ( const std::vector< Signature * > &  signatures,
bool  bDelete = false 
) [pure virtual]

Removes several signatures from the set.

This method removes several sigs from the set, optionally deleting them in the process. If the list of sigs to remove contains sigs not in the set, those sigs will be ignored.

Parameters:
signatures A vector of sigs to remove from the set
bDelete Specifies if the signatures should be destroyed as well as being removed from the set. Signatures not found in the set will not be deleted regardless of the value of this parameter.
Returns:
Returns true if the list of signatures to remove was not empty and all of the specified signatures were found in the set; otherwise returns false.
Subject Notifications:
This method will notify Subject::signalModified after the signatures are done being removed from the list. Only one notification will be done.

Implemented in SignatureLibrary.

virtual void SignatureSet::clear ( bool  bDelete = false  )  [pure virtual]

Removes all of the signatures from the set.

This method removes all of the signatures from the set, optionally deleting them in the process.

Parameters:
bDelete Specifies if the signatures should be destroyed as well as being removed from the set.
Subject Notifications:
This method will notify Subject::signalModified after the signatures are done being removed from the set if the set was not empty. At most one notification will be done.

Implemented in SignatureLibrary.


Software Development Kit - Opticks 4.9.0 Build 16218