annotate Jint.Runtime/ClassDescriptor.cs @ 2:4aed85a1f558

implemented simple vm2
author cin
date Fri, 25 Oct 2013 15:52:16 +0400
parents e113095f1de0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
1 using System;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
2 using System.Collections.Generic;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
3
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
4
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
5 namespace Jint.Runtime
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
6 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
7 public class ClassDescriptor
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
8 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
9 int m_classId;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
10
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
11 Dictionary<string,PropertyDescriptor> m_props = new Dictionary<string, PropertyDescriptor>();
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
12
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
13
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
14 public int ClassId {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
15 get { return m_classId; }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
16 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
17
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
18 public ClassDescriptor (int classId)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
19 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
20 m_classId = classId;
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
21 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
22
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
23 public bool TryGet (string name, out PropertyDescriptor descriptor)
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
24 {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
25 return m_props.TryGetValue (name, out descriptor);
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
26 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
27
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
28 public void DefineProperty(string name, PropertyDescriptor descriptor) {
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
29
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
30 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
31 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
32 }
e113095f1de0 initial commit, proof of concept
cin
parents:
diff changeset
33