<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,5 +1,19 @@
 module RbGCCXML
   # Field is a class's Ivar
   class Field &lt; Node
+
+    # Get the C++ type of this argument.
+    def cpp_type
+      XMLParsing.find_type_of(node, &quot;type&quot;)
+    end
+
+    # Print out the full string of this argument as given
+    # in the source. If full == true, include the type information
+    def to_s(full = false)
+      str = self.name
+      str = &quot;#{self.cpp_type.to_s(true)} #{str}&quot; if full
+      str
+    end
+
   end
 end</diff>
      <filename>lib/rbgccxml/nodes/field.rb</filename>
    </modified>
    <modified>
      <diff>@@ -40,9 +40,14 @@ namespace types {
    * User defined types 
    */
   class user_type {
+    public:
+      int var1;
+      float var2;
   };
 
   struct struct_type {
+    public:
+      user_type myType;
   };
 
   enum myEnum {</diff>
      <filename>test/headers/types.h</filename>
    </modified>
    <modified>
      <diff>@@ -119,6 +119,13 @@ context &quot;Printing types&quot; do
     @@types_source.functions.find(:returns =&gt; &quot;const int*&quot;).return_type.base_type.to_s.should == &quot;int&quot;
   end
 
+  specify &quot;can get types of class ivars&quot; do
+    @@types_source.classes(&quot;user_type&quot;).variables(&quot;var1&quot;).cpp_type.to_s.should == &quot;int&quot;
+    @@types_source.classes(&quot;user_type&quot;).variables(&quot;var2&quot;).cpp_type.to_s.should == &quot;float&quot;
+
+    @@types_source.structs(&quot;struct_type&quot;).variables(&quot;myType&quot;).cpp_type.to_s(true).should == &quot;types::user_type&quot;
+  end
+
 end
 
 context &quot;Type comparitors&quot; do</diff>
      <filename>test/types_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>fd492327306d97f8501cb6a597142fe881b76837</id>
    </parent>
  </parents>
  <author>
    <name>Jason Roelofs</name>
    <email>jameskilton@gmail.com</email>
  </author>
  <url>http://github.com/jameskilton/rbgccxml/commit/f651677f10450f032956caaa31ecbf427ab46eba</url>
  <id>f651677f10450f032956caaa31ecbf427ab46eba</id>
  <committed-date>2009-05-12T14:47:24-07:00</committed-date>
  <authored-date>2009-05-12T14:47:24-07:00</authored-date>
  <message>Can query and print the types of class ivars (Fields)</message>
  <tree>b133456026e4568cd027cc1ca4d3ede16be126ed</tree>
  <committer>
    <name>Jason Roelofs</name>
    <email>jameskilton@gmail.com</email>
  </committer>
</commit>
