File: LocalVariableRecord.h

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 (32 lines) | stat: -rw-r--r-- 975 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
// Copyright (c) 1997  David Engberg  All rights reserved
// $Id: LocalVariableRecord.h,v 1.1 1997/11/10 00:48:06 geppetto Exp $
#ifndef _LocalVariableRecord_h
#define _LocalVariableRecord_h
#pragma interface

#include "VariableDeclaration.h"

//
//  Class name : CLocalVariableRecord
//  Description : This is a single record storing the information about a local
//    variable and its index in the variable table.
//
class CLocalVariableRecord {
public:
  typedef unsigned short VariableIndex;
  CLocalVariableRecord();
  CLocalVariableRecord(const CVariableDeclaration& declaration,
		       VariableIndex index);
  CLocalVariableRecord(const CLocalVariableRecord& source);
  virtual ~CLocalVariableRecord();
  
  VariableIndex GetVariableIndex() const { return fIndex; }
  void SetVariableIndex(VariableIndex index);
  CVariableDeclaration GetDeclaration() const { return fDeclaration; }

private:
  CVariableDeclaration fDeclaration;
  VariableIndex fIndex;
};

#endif