~ubuntu-branches/ubuntu/trusty/smuxi/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/db4o-net/Db4objects.Db4o.NativeQueries/Db4objects.Db4o.NativeQueries/Expr/Cmp/Operand/FieldValue.cs

  • Committer: Package Import Robot
  • Author(s): Mirco Bauer
  • Date: 2013-05-25 22:11:31 UTC
  • mfrom: (1.2.12)
  • Revision ID: package-import@ubuntu.com-20130525221131-nd2mc0kzubuwyx20
Tags: 0.8.11-1
* [22d13d5] Imported Upstream version 0.8.11
* [6d2b95a] Refreshed patches
* [89eb66e] Added ServiceStack libraries to smuxi-engine package
* [848ab10] Enable Campfire engine
* [c6dbdc7] Always build db4o for predictable build result
* [13ec489] Exclude OS X specific libraries from dh_clideps

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2004 - 2009  Versant Inc.  http://www.db4o.com */
2
 
 
3
 
using Db4objects.Db4o.Instrumentation.Api;
4
 
using Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand;
5
 
 
6
 
namespace Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand
7
 
{
8
 
        public class FieldValue : ComparisonOperandDescendant
9
 
        {
10
 
                private readonly IFieldRef _field;
11
 
 
12
 
                public FieldValue(IComparisonOperandAnchor root, IFieldRef field) : base(root)
13
 
                {
14
 
                        _field = field;
15
 
                }
16
 
 
17
 
                public virtual string FieldName()
18
 
                {
19
 
                        return _field.Name;
20
 
                }
21
 
 
22
 
                public override bool Equals(object other)
23
 
                {
24
 
                        if (!base.Equals(other))
25
 
                        {
26
 
                                return false;
27
 
                        }
28
 
                        Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand.FieldValue casted = (Db4objects.Db4o.NativeQueries.Expr.Cmp.Operand.FieldValue
29
 
                                )other;
30
 
                        return _field.Equals(casted._field);
31
 
                }
32
 
 
33
 
                public override int GetHashCode()
34
 
                {
35
 
                        return base.GetHashCode() * 29 + _field.GetHashCode();
36
 
                }
37
 
 
38
 
                public override string ToString()
39
 
                {
40
 
                        return base.ToString() + "." + _field;
41
 
                }
42
 
 
43
 
                public override void Accept(IComparisonOperandVisitor visitor)
44
 
                {
45
 
                        visitor.Visit(this);
46
 
                }
47
 
 
48
 
                public virtual IFieldRef Field
49
 
                {
50
 
                        get
51
 
                        {
52
 
                                return _field;
53
 
                        }
54
 
                }
55
 
 
56
 
                public override ITypeRef Type
57
 
                {
58
 
                        get
59
 
                        {
60
 
                                return _field.Type;
61
 
                        }
62
 
                }
63
 
        }
64
 
}