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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
// Copyright (c) 1996 David Engberg All rights reserved
// $Id: CompileError.C,v 1.2 1996/01/08 03:03:38 geppetto Exp $
#pragma implementation
#include "CompileError.h"
const unsigned long CCompileError::kNoLineNumber = 0;
//
// Method name : CCompileError
// Description : Constructor.
//
CCompileError::CCompileError(const unicode_string& message, unsigned long line)
: fMessage(message),
fLineNumber(line)
{
}
//
// Method name : CCompileError
// Description : Constructor.
//
CCompileError::CCompileError(const string& message, unsigned long line)
: fMessage(::StringToUnicode(message)),
fLineNumber(line)
{
}
//
// Method name : CCompileError
// Description : Copy constructor.
//
CCompileError::CCompileError(const CCompileError& source)
: fMessage(source.fMessage),
fLineNumber(source.fLineNumber)
{
}
//
// Method name : operator=
// Description : Assignment operator.
//
CCompileError&
CCompileError::operator=(const CCompileError& source)
{
if (&source != this) {
fMessage = source.fMessage;
fLineNumber = source.fLineNumber;
}
return *this;
}
|