File: cmdsequence.C

package info (click to toggle)
speaker 1.0.1-4
  • links: PTS
  • area: main
  • in suites: woody
  • size: 264 kB
  • ctags: 174
  • sloc: cpp: 1,521; tcl: 786; makefile: 91; sh: 22
file content (28 lines) | stat: -rw-r--r-- 673 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//************************************************************
//   commandSequence classe definition for the speakerphone app.
//************************************************************
#include "incall.h"

CommandSequence::CommandSequence()
{
   Command = NULL;
   GoodAnswer = NULL;
   next = NULL;
};

CommandSequence::CommandSequence(char* Cmd, char* GdAnswr)
{
   Command = new char[strlen(Cmd) + 1];
   strcpy(Command, Cmd);
   GoodAnswer = new char[strlen(GdAnswr) + 1];
   strcpy(GoodAnswer, GdAnswr);
   next = NULL;
};


CommandSequence::~CommandSequence()
{
   if (next) delete next;
   if (Command) delete Command;
   if (GoodAnswer) delete GoodAnswer;
};