Fixing an issue with output parameters that are of type IntPtr
[castle.git] / ActiveRecord / Castle.ActiveRecord / Framework / Internal / Model / DependentObjectModel.cs
blob6a6523c1594073a333b6d4e96454d6b30c82bc59
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.ActiveRecord.Framework.Internal
17 using System.Reflection;
19 ///<summary>
20 /// This model is used to represent a dependent object value type (&lt;composite-element/&gt; - in NHibernate talk).
21 ///</summary>
22 public class DependentObjectModel : IVisitable
24 private readonly HasManyAttribute hasManyAtt;
25 private readonly ActiveRecordModel dependentObjectModel;
28 ///<summary>
29 /// Initializes a new instance of the <see cref="DependentObjectModel"/> class.
30 ///</summary>
31 /// <param name="propInfo">The prop info.</param>
32 /// <param name="hasManyAtt">The nested att.</param>
33 /// <param name="dependentObjectModel">The nested model.</param>
34 public DependentObjectModel(PropertyInfo propInfo, HasManyAttribute hasManyAtt, ActiveRecordModel dependentObjectModel)
36 this.dependentObjectModel = dependentObjectModel;
37 this.hasManyAtt = hasManyAtt;
40 /// <summary>
41 /// Gets the model.
42 /// </summary>
43 /// <value>The model.</value>
44 public ActiveRecordModel Model
46 get { return dependentObjectModel; }
48 /// <summary>
49 /// Gets the has many attribute
50 /// </summary>
51 /// <value>The has many att.</value>
52 public HasManyAttribute HasManyAtt
54 get { return hasManyAtt; }
57 #region IVisitable Members
59 /// <summary>
60 /// Accepts the specified visitor and call the relevant IVisitor.Visit***() method
61 /// </summary>
62 /// <param name="visitor">The visitor.</param>
63 public void Accept(IVisitor visitor)
65 visitor.VisitDependentObject(this);
68 #endregion