Acoustic Touch Recognition
Public Member Functions | Private Attributes | List of all members
SoundGesture Class Reference

This class describes a sound gesture. More...

#include <libacoustic_touch.h>

Public Member Functions

 SoundGesture (int m_num=0, string m_id="")
 Empty constructor. Admits number and id. Sets also the empty flag to true. More...
 
 SoundGesture (int m_num, string m_id, vector< double > atts)
 Parametrized constructor. In this case sets the empty flag to false. More...
 
 ~SoundGesture ()
 
void setAttributes (vector< double >)
 Sets the float attributes of the sound gesture. More...
 
void clearAttributes ()
 This function sets to zeros all the attributes in the vector. More...
 
void setId (string)
 Sets the identifier. More...
 
void setEmpty (bool)
 Sets the emptyness boolean attribute. More...
 
void setWaiting (bool)
 Sets the waiting boolean attribute. This attribute marks if the container for the gesture is waiting to be filled. More...
 
vector< double > getAttributes () const
 Gets the audio attributes. More...
 
int getMicNum () const
 Gets the mic number. In order to know the source. More...
 
string getMicId () const
 Gets the mic identifier. Again allows to verfy the source. More...
 
bool isEmpty () const
 Determines if the gesture is empty. In other words if it has been cleared, or simply has not been modified since constructed. More...
 
bool isWaiting () const
 Determines if the gesture container is waiting to be filled. More...
 
SoundGestureoperator= (const SoundGesture &SG)
 Equal operator made in order to simplify this operation. It is handy in this kind of simple yet atomic classes. More...
 

Private Attributes

vector< double > num_attrib_
 
int mic_num_
 
string mic_id_
 
bool empty_
 
bool waiting_
 

Detailed Description

This class describes a sound gesture.

Constructor & Destructor Documentation

◆ SoundGesture() [1/2]

SoundGesture::SoundGesture ( int  m_num = 0,
string  m_id = "" 
)
inline

Empty constructor. Admits number and id. Sets also the empty flag to true.

Parameters
[in]m_numThe microphone number
[in]m_idThe microphone identifier from the computer

◆ SoundGesture() [2/2]

SoundGesture::SoundGesture ( int  m_num,
string  m_id,
vector< double >  atts 
)
inline

Parametrized constructor. In this case sets the empty flag to false.

Parameters
[in]m_numThe microphone number
[in]m_idThe microphone identifier from the computer
[in]attsThe sound attributes

◆ ~SoundGesture()

SoundGesture::~SoundGesture ( )
inline

Member Function Documentation

◆ clearAttributes()

void SoundGesture::clearAttributes ( )

This function sets to zeros all the attributes in the vector.

◆ getAttributes()

vector< double > SoundGesture::getAttributes ( ) const

Gets the audio attributes.

Returns
The sound attributes.

◆ getMicId()

string SoundGesture::getMicId ( ) const

Gets the mic identifier. Again allows to verfy the source.

Returns
The mic identifier.

◆ getMicNum()

int SoundGesture::getMicNum ( ) const

Gets the mic number. In order to know the source.

Returns
The mic number.

◆ isEmpty()

bool SoundGesture::isEmpty ( ) const

Determines if the gesture is empty. In other words if it has been cleared, or simply has not been modified since constructed.

Returns
True if empty, False otherwise.

◆ isWaiting()

bool SoundGesture::isWaiting ( ) const

Determines if the gesture container is waiting to be filled.

Returns
True if empty, False otherwise.

◆ operator=()

SoundGesture & SoundGesture::operator= ( const SoundGesture SG)

Equal operator made in order to simplify this operation. It is handy in this kind of simple yet atomic classes.

Parameters
[in]SGThe sound gesture source that will be copied.
Returns
The sound gesture which will be modified.

◆ setAttributes()

void SoundGesture::setAttributes ( vector< double >  atts)

Sets the float attributes of the sound gesture.

Parameters
[in]attsVector with the audio attributes extracted.

◆ setEmpty()

void SoundGesture::setEmpty ( bool  emptyness)

Sets the emptyness boolean attribute.

◆ setId()

void SoundGesture::setId ( string  id)

Sets the identifier.

Parameters
[in]idThe identifier assigned from the computer.

◆ setWaiting()

void SoundGesture::setWaiting ( bool  flag)

Sets the waiting boolean attribute. This attribute marks if the container for the gesture is waiting to be filled.

Member Data Documentation

◆ empty_

bool SoundGesture::empty_
private

◆ mic_id_

string SoundGesture::mic_id_
private

◆ mic_num_

int SoundGesture::mic_num_
private

◆ num_attrib_

vector<double> SoundGesture::num_attrib_
private

◆ waiting_

bool SoundGesture::waiting_
private

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