File: CompileError.C

package info (click to toggle)
guavac 1.0-5
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 2,716 kB
  • ctags: 2,357
  • sloc: cpp: 19,765; yacc: 1,629; makefile: 492; lex: 348; ansic: 284; sh: 280
file content (50 lines) | stat: -rw-r--r-- 1,101 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
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;
}