store_value_ref.ts 643 B

1234567891011121314151617181920212223242526272829303132
  1. import { IStoreValue } from "./istore_value";
  2. import { Type } from "../../../typeSystem/type";
  3. export class StoreValueRef implements IStoreValue {
  4. public isConst = false;
  5. private reference_dimesion = 0;
  6. constructor(public type: Type, public value: any, private loc_address: number, public id:String) {
  7. }
  8. get () {
  9. return this.value;
  10. }
  11. getRefAddress () : number {
  12. return this.loc_address;
  13. }
  14. inStore () {
  15. return this.id != null;
  16. }
  17. getReferenceDimension (): number {
  18. return this.reference_dimesion;
  19. }
  20. setReferenceDimension (dimension: number):void {
  21. this.reference_dimesion = dimension;
  22. }
  23. }