~jozilla/uiml.net/uiml.net-tp

« back to all changes in this revision

Viewing changes to Cassowary/ClAbstractVariable.cs

  • Committer: Jo Vermeulen
  • Date: 2007-09-05 14:26:30 UTC
  • mfrom: (249.1.16 Uiml.net)
  • Revision ID: jo.vermeulen@uhasselt.be-20070905142630-w5eafpsfntbgz0ko
Merged with Jo's main branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
  Cassowary.net: an incremental constraint solver for .NET
3
 
  (http://lumumba.uhasselt.be/jo/projects/cassowary.net/)
4
 
  
5
 
  Copyright (C) 2005  Jo Vermeulen (jo.vermeulen@uhasselt.be)
6
 
  
7
 
  This program is free software; you can redistribute it and/or
8
 
  modify it under the terms of the GNU Lesser General Public License
9
 
  as published by the Free Software Foundation; either version 2.1
10
 
  of  the License, or (at your option) any later version.
11
 
 
12
 
  This program is distributed in the hope that it will be useful,
13
 
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 
  GNU Lesser General Public License for more details.
16
 
 
17
 
  You should have received a copy of the GNU Lesser General Public License
18
 
  along with this program; if not, write to the Free Software
19
 
  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
20
 
*/
21
 
 
22
 
using System;
23
 
 
24
 
namespace Cassowary
25
 
{
26
 
  public abstract class ClAbstractVariable
27
 
  {
28
 
    public ClAbstractVariable(string name)
29
 
    {
30
 
      _name = name;
31
 
      iVariableNumber++;
32
 
    }
33
 
 
34
 
    public ClAbstractVariable()
35
 
    {
36
 
      _name = "v" + iVariableNumber;
37
 
      iVariableNumber++;
38
 
    }
39
 
 
40
 
    public ClAbstractVariable(long varnumber, string prefix)
41
 
    {
42
 
      _name = prefix + varnumber;
43
 
      iVariableNumber++;
44
 
    }
45
 
 
46
 
    public string Name
47
 
    {
48
 
      get { return _name; }
49
 
      set { _name = value; }
50
 
    }
51
 
 
52
 
    public virtual bool IsDummy
53
 
    {
54
 
      get { return false; }
55
 
    }
56
 
 
57
 
    public abstract bool IsExternal
58
 
    {
59
 
      get;
60
 
    }
61
 
 
62
 
    public abstract bool IsPivotable
63
 
    {
64
 
      get;
65
 
    }
66
 
 
67
 
    public abstract bool IsRestricted
68
 
    {
69
 
      get;
70
 
    }
71
 
 
72
 
    public override abstract string ToString();
73
 
    
74
 
    public static int NumCreated
75
 
    {
76
 
      get { return iVariableNumber; }
77
 
    }
78
 
 
79
 
    private string _name;
80
 
    private static int iVariableNumber;
81
 
  }
82
 
}