Skip to content
Snippets Groups Projects
Commit 62b3c7bd authored by Yun Liu's avatar Yun Liu
Browse files

remove warnings for several classes

parent bfdd1e11
Branches
Tags
No related merge requests found
......@@ -45,6 +45,15 @@ public:
*/
~AudioFile();
// Copy Constructor
AudioFile(const AudioFile& rh):_filename(""), _codec(NULL), _start(false) { *this = rh; }
// Assignment Operator
AudioFile& operator=( const AudioFile& rh){
_debug("DTMFException assignment operator hasn't been implemented yet. Quit!");
exit(0);
}
/**
* Load a sound file in memory
* @param filename The absolute path to the file
......
......@@ -62,6 +62,18 @@ DTMFException::~DTMFException() throw()
}
DTMFException::DTMFException(const DTMFException& rh) throw()
{
*this = rh;
}
DTMFException& DTMFException::operator=(const DTMFException& rh) throw()
{
_debug("DTMFException assignment operator hasn't been implemented yet. Quit!");
exit(0);
}
const char* DTMFException::what() const throw()
{
return reason;
......@@ -90,6 +102,16 @@ DTMFGenerator::~DTMFGenerator() {
}
}
DTMFGenerator::DTMFGenerator(const DTMFGenerator& rh) : tone("", rh._sampleRate)
{
*this = rh;
}
DTMFGenerator& DTMFGenerator::operator=(const DTMFGenerator& rh)
{
_debug("DTMFGenerator assignment operator hasn't been implemented yet. Quit!");
exit(0);
}
/*
* Get n samples of the signal of code code
......
......@@ -53,6 +53,12 @@ class DTMFException : public std::exception
*/
virtual ~DTMFException() throw();
// Copy Constructor
DTMFException(const DTMFException& rh) throw();
// Assignment Operator
DTMFException& operator=( const DTMFException& rh) throw();
/**
* @return const char* The error
*/
......@@ -107,6 +113,12 @@ class DTMFGenerator
*/
~DTMFGenerator();
// Copy Constructor
DTMFGenerator(const DTMFGenerator& rh);
// Assignment Operator
DTMFGenerator& operator=( const DTMFGenerator& rh);
/*
* Get n samples of the signal of code code
* @param buffer a SFLDataFormat pointer to an allocated buffer
......
......@@ -30,11 +30,10 @@
#define MIN_BUFFER_SIZE 1280
// Create a ring buffer with 'size' bytes
RingBuffer::RingBuffer(int size) {
mBufferSize = (size > MIN_BUFFER_SIZE ? size : MIN_BUFFER_SIZE);
mStart = 0;
mEnd = 0;
mBuffer = new unsigned char[mBufferSize];
RingBuffer::RingBuffer(int size): mStart( 0 ), mEnd( 0 )
, mBufferSize( size > MIN_BUFFER_SIZE ? size : MIN_BUFFER_SIZE )
, mBuffer (new unsigned char[mBufferSize])
{
assert (mBuffer != NULL);
}
......@@ -43,6 +42,12 @@ RingBuffer::~RingBuffer() {
delete[] mBuffer; mBuffer = NULL;
}
// Assignment operator
RingBuffer& RingBuffer::operator=(const RingBuffer& rh) {
_debug("RingBuffer assignment operator hasn't been implemented yet. Quit!");
exit(0);
}
void
RingBuffer::flush (void) {
mStart = 0;
......
......@@ -38,6 +38,13 @@ class RingBuffer {
*/
~RingBuffer();
// Copy Constructor
RingBuffer(const RingBuffer& rh): mStart(rh.mStart), mEnd(rh.mEnd), mBufferSize( rh.mBufferSize ), mBuffer ( rh.mBuffer )
{ *this = rh; }
// Assignment operator
RingBuffer& operator=(const RingBuffer& rh);
/**
* Reset the counters to 0
*/
......
......@@ -20,12 +20,28 @@
#include "eventthread.h"
#include "voiplink.h"
#include <stdlib.h>
#include <assert.h>
#include <string.h>
#include "global.h"
EventThread::EventThread (VoIPLink* link) : Thread ()
EventThread::EventThread (VoIPLink* link) : Thread (), _linkthread(link), stopIt(false)
{
_linkthread = link;
setCancel(cancelDeferred);
stopIt = false;
}
// Copy Constructor
EventThread::EventThread(const EventThread& rh): _linkthread(NULL), stopIt(false)
{
*this = rh;
}
// Assignment Operator overloading
EventThread& EventThread::operator=(const EventThread& rh)
{
_debug("EventThread assignment operator hasn't been implemented yet. Quit! ");
//exit(0);
}
EventThread::~EventThread (void)
......
......@@ -37,7 +37,8 @@ public:
*/
EventThread (VoIPLink*);
~EventThread (void);
EventThread(const EventThread& rh); // copy constructor
EventThread& operator=(const EventThread& rh); // assignment operator
virtual void run ();
virtual void stop();
virtual void startLoop();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment