- Timestamp:
- Mar 3, 2008, 10:15:06 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Include/Classes/ActiveBasic/Core/TypeInfo.ab
r450 r452 17 17 memberNames As *String ' 名前リスト 18 18 memberTypeFullNames As *String ' 型名リスト 19 memberOffsets As *LONG_PTR ' クラスの先頭ポインタからのオフセット値 19 20 memberCounts As Long ' 個数 20 21 memberInfosCache As System.Collections.Generic.List<System.Reflection.MemberInfo> … … 46 47 Dim result = New TypeBaseImpl( strNamespace, name, fullName ) 47 48 result.SetBaseType( baseType ) 48 result.SetMembers( memberNames, memberTypeFullNames, member Counts )49 result.SetMembers( memberNames, memberTypeFullNames, memberOffsets, memberCounts ) 49 50 result.memberInfosCache = This.memberInfosCache 50 51 result.ptrLevel = This.ptrLevel … … 54 55 Public 55 56 56 Sub SetMembers( memberNames As *String, memberTypeFullNames As *String, num As Long )57 Sub SetMembers( memberNames As *String, memberTypeFullNames As *String, memberOffsets As *LONG_PTR, num As Long ) 57 58 This.memberNames = memberNames 58 59 This.memberTypeFullNames = memberTypeFullNames 60 This.memberOffsets = memberOffsets 59 61 This.memberCounts = num 60 62 … … 146 148 Dim i As Long 147 149 For i=0 To ELM(memberCounts) 148 memberInfosCache.Add( New System.Reflection.MemberInfo( memberNames[i], _System_TypeBase_Search( memberTypeFullNames[i] ) ) )150 memberInfosCache.Add( New System.Reflection.MemberInfo( memberNames[i], _System_TypeBase_Search( memberTypeFullNames[i] ), memberOffsets[i] ) ) 149 151 Next 150 152 End If -
trunk/Include/Classes/System/Reflection/MemberInfo.ab
r414 r452 9 9 name As String 10 10 memberType As TypeInfo 11 offset As LONG_PTR 11 12 Public 12 13 … … 16 17 memberType メンバの型 17 18 */ 18 Sub MemberInfo( name As String, memberType As TypeInfo )19 Sub MemberInfo( name As String, memberType As TypeInfo, offset As LONG_PTR ) 19 20 This.name = name 20 21 This.memberType = memberType 22 This.offset = offset 21 23 End Sub 22 24 23 25 /*! 24 @brief メンバの名前を取得する 25 @return メンバの名前 26 @brief メンバの名前を取得する。 27 @return メンバの名前。 26 28 */ 27 29 Function Name() As String … … 30 32 31 33 /*! 32 @brief メンバの型を取得する 33 @return メンバの型 34 @brief メンバの型を取得する。 35 @return メンバの型。 34 36 */ 35 37 Function MemberType() As TypeInfo 36 38 Return memberType 39 End Function 40 41 /*! 42 @brief クラスの先頭ポインタからのオフセット値を取得する。 43 @return クラスの先頭ポインタからのオフセット値。 44 */ 45 Function _System_Offset() As LONG_PTR 46 Return offset 37 47 End Function 38 48 End Class -
trunk/Include/Classes/System/Xml/XmlDocument.ab
r451 r452 94 94 95 95 /*! 96 @brief 指定したストリームからXML文書を読み込む。 97 @param stream 読み込み先のストリーム。 98 */ 99 Virtual Sub Load( inStream As System.IO.Stream ) 100 Dim length = inStream.Length As DWord 101 Dim xmlBuffer = calloc( length + 1 ) As *StrChar 102 inStream.Read( xmlBuffer As *Byte, 0, length ) 103 Dim xmlString = New String( xmlBuffer ) 104 free( xmlBuffer ) 105 106 This.RemoveAll() 107 ActiveBasic.Xml.Parser.Parse( xmlString, This ) 108 End Sub 109 110 /*! 111 @brief 指定したファイルからXML文書を読み込む。 112 @param ファイルパス。 113 */ 114 Virtual Sub Load( filename As String ) 115 Dim fileStream As System.IO.FileStream( filename, System.IO.FileMode.Open, System.IO.FileAccess.Read ) 116 Load( fileStream ) 117 End Sub 118 119 /*! 96 120 @brief 指定したストリームにXML文書を保存する。 97 121 @param stream 保存先のストリーム。 … … 107 131 */ 108 132 Virtual Sub Save( filename As String ) 109 Dim fileStream As System.IO.FileStream( filename, System.IO.FileMode.Create )133 Dim fileStream As System.IO.FileStream( filename, System.IO.FileMode.Create, System.IO.FileAccess.Write ) 110 134 Save( fileStream ) 111 135 End Sub 112 136 137 Private 138 Sub LoadXmlString( xmlString As String) 139 End Sub 113 140 End Class 114 141 -
trunk/Include/Classes/index.ab
r432 r452 9 9 #require "./ActiveBasic/Windows/WindowHandle.sbp" 10 10 #require "./ActiveBasic/Windows/Windows.ab" 11 #require "./ActiveBasic/Xml/Parser.ab" 11 12 #require "./System/Blittable.ab" 12 13 #require "./System/Console.ab" … … 105 106 #require "./System/Xml/XmlNode.ab" 106 107 #require "./System/Xml/XmlText.ab" 108 #require "./System/Xml/Serialization/XmlSerializer.ab"
Note:
See TracChangeset
for help on using the changeset viewer.