singrdk/base/Libraries/Policy/Ref.cs

25 lines
840 B
C#
Raw Normal View History

2008-11-17 18:29:00 -05:00
// ----------------------------------------------------------------------------
2008-03-05 09:52:00 -05:00
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
2008-11-17 18:29:00 -05:00
// ----------------------------------------------------------------------------
2008-03-05 09:52:00 -05:00
2008-11-17 18:29:00 -05:00
namespace Microsoft.Singularity.Policy.Engine
{
2008-03-05 09:52:00 -05:00
// A Ref is a Cell containing an Address. A new
// <REF addr> is represented by a new Ref(addr).
internal class Ref : Cell {
Address _value;
internal Address Value { get { return _value; } set { _value = value; } }
internal Ref(Address value) { _value = value; }
public override string ToString() {
if (_value._cell == this) {
return "<REF>";
2008-11-17 18:29:00 -05:00
}
else {
2008-03-05 09:52:00 -05:00
return "<REF " + _value.ToString() + ">";
}
}
}
}