Added the ability to introspect types thourgh the public SBType interface.

Fixed up many API calls to not be "const" as const doesn't mean anything to
most of our lldb::SB objects since they contain a shared pointer, auto_ptr, or
pointer to the types which circumvent the constness anyway.



git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@139428 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/scripts/Python/interface/SBType.i b/scripts/Python/interface/SBType.i
index 3086338..ea20754 100644
--- a/scripts/Python/interface/SBType.i
+++ b/scripts/Python/interface/SBType.i
@@ -9,6 +9,35 @@
 
 namespace lldb {
 
+    %feature("docstring",
+"Represents a member of a type in lldb.
+") SBTypeMember;
+
+class SBTypeMember
+{
+public:
+    SBTypeMember ();
+
+    SBTypeMember (const lldb::SBTypeMember& rhs);
+
+    ~SBTypeMember();
+
+    bool
+    IsValid() const;
+
+    const char *
+    GetName ();
+
+    lldb::SBType
+    GetType ();
+
+    uint64_t
+    GetOffsetByteSize();
+
+protected:
+    std::auto_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
+};
+
 %feature("docstring",
 "Represents a data type in lldb.  The FindFirstType() method of SBTarget/SBModule
 returns a SBType.
@@ -85,39 +114,60 @@
 class SBType
 {
 public:
-    SBType (const SBType &rhs);
+    SBType (const lldb::SBType &rhs);
 
     ~SBType ();
 
     bool
-    IsValid() const;
+    IsValid();
 
     size_t
-    GetByteSize() const;
+    GetByteSize();
 
     bool
-    IsPointerType() const;
+    IsPointerType();
 
     bool
-    IsReferenceType() const;
+    IsReferenceType();
 
-    SBType
-    GetPointerType() const;
+    lldb::SBType
+    GetPointerType();
 
-    SBType
-    GetPointeeType() const;
+    lldb::SBType
+    GetPointeeType();
 
-    SBType
-    GetReferenceType() const;
+    lldb::SBType
+    GetReferenceType();
 
-    SBType
-    GetDereferencedType() const;
+    lldb::SBType
+    GetDereferencedType();
 
-    SBType
-    GetBasicType(lldb::BasicType type) const;
+    lldb::SBType
+    GetBasicType (lldb::BasicType type);
+
+    uint32_t
+    GetNumberOfFields ();
+    
+    uint32_t
+    GetNumberOfDirectBaseClasses ();
+    
+    uint32_t
+    GetNumberOfVirtualBaseClasses ();
+    
+    lldb::SBTypeMember
+    GetFieldAtIndex (uint32_t idx);
+    
+    lldb::SBTypeMember
+    GetDirectBaseClassAtIndex (uint32_t idx);
+    
+    lldb::SBTypeMember
+    GetVirtualBaseClassAtIndex (uint32_t idx);
 
     const char*
     GetName();
+    
+    lldb::TypeClass
+    GetTypeClass ();
 };
 
 %feature("docstring",
@@ -157,15 +207,15 @@
     SBTypeList();
 
     bool
-    IsValid() const;
+    IsValid();
 
     void
-    Append(const SBType& type);
+    Append (lldb::SBType type);
 
-    SBType
-    GetTypeAtIndex(int index);
+    lldb::SBType
+    GetTypeAtIndex (uint32_t index);
 
-    int
+    uint32_t
     GetSize();
 
     ~SBTypeList();
diff --git a/scripts/Python/interface/SBValue.i b/scripts/Python/interface/SBValue.i
index e872410..8792464 100644
--- a/scripts/Python/interface/SBValue.i
+++ b/scripts/Python/interface/SBValue.i
@@ -65,7 +65,7 @@
     ~SBValue ();
 
     bool
-    IsValid() const;
+    IsValid();
     
     SBError
     GetError();
@@ -86,7 +86,7 @@
     IsInScope ();
 
     lldb::Format
-    GetFormat () const;
+    GetFormat ();
     
     void
     SetFormat (lldb::Format format);
@@ -185,21 +185,21 @@
                      bool can_create_synthetic);
     
     lldb::SBValue
-    CreateChildAtOffset (const char *name, uint32_t offset, const SBType& type);
+    CreateChildAtOffset (const char *name, uint32_t offset, lldb::SBType type);
     
     lldb::SBValue
-    SBValue::Cast(const SBType& type);
+    SBValue::Cast (lldb::SBType type);
 
     lldb::SBValue
     CreateValueFromExpression (const char *name, const char* expression);
 
     lldb::SBValue
-    CreateValueFromAddress(const char* name, lldb::addr_t address, const SBType& type);
+    CreateValueFromAddress(const char* name, lldb::addr_t address, lldb::SBType type);
     
 	lldb::SBValue
 	CreateValueFromData (const char* name,
-	                     const SBData& data,
-	                     const SBType& type);
+	                     lldb::SBData data,
+	                     lldb::SBType type);
 
     lldb::SBType
     GetType();