Changeset 222 for CoolStreaming
- Timestamp:
- Apr 4, 2011, 12:24:18 PM (14 years ago)
- Location:
- CoolStreaming
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolStreaming/Demo/VarBlockSerializer/VarBlockSerializerDemo.lpi
r174 r222 43 43 </Item3> 44 44 </RequiredPackages> 45 <Units Count=" 8">45 <Units Count="15"> 46 46 <Unit0> 47 47 <Filename Value="VarBlockSerializerDemo.lpr"/> 48 48 <IsPartOfProject Value="True"/> 49 49 <UnitName Value="VarBlockSerializerDemo"/> 50 <UsageCount Value="5 5"/>50 <UsageCount Value="57"/> 51 51 </Unit0> 52 52 <Unit1> … … 56 56 <ResourceBaseClass Value="Form"/> 57 57 <UnitName Value="UMainForm"/> 58 <IsVisibleTab Value="True"/>59 58 <EditorIndex Value="0"/> 60 59 <WindowIndex Value="0"/> 61 <TopLine Value=" 167"/>62 <CursorPos X=" 40" Y="174"/>63 <UsageCount Value="5 5"/>60 <TopLine Value="221"/> 61 <CursorPos X="1" Y="238"/> 62 <UsageCount Value="57"/> 64 63 <Loaded Value="True"/> 65 64 <LoadedDesigner Value="True"/> … … 68 67 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\spin.pp"/> 69 68 <UnitName Value="Spin"/> 70 <EditorIndex Value=" 6"/>69 <EditorIndex Value="12"/> 71 70 <WindowIndex Value="0"/> 72 71 <TopLine Value="172"/> 73 72 <CursorPos X="17" Y="185"/> 74 <UsageCount Value="2 8"/>73 <UsageCount Value="29"/> 75 74 <Loaded Value="True"/> 76 75 </Unit2> … … 78 77 <Filename Value="..\..\UVarBlockSerializer.pas"/> 79 78 <UnitName Value="UVarBlockSerializer"/> 80 <EditorIndex Value="2"/> 81 <WindowIndex Value="0"/> 82 <TopLine Value="392"/> 83 <CursorPos X="74" Y="405"/> 84 <UsageCount Value="28"/> 79 <IsVisibleTab Value="True"/> 80 <EditorIndex Value="8"/> 81 <WindowIndex Value="0"/> 82 <TopLine Value="218"/> 83 <CursorPos X="22" Y="248"/> 84 <UsageCount Value="29"/> 85 85 <Loaded Value="True"/> 86 86 </Unit3> 87 87 <Unit4> 88 88 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\classesh.inc"/> 89 <EditorIndex Value=" 4"/>89 <EditorIndex Value="10"/> 90 90 <WindowIndex Value="0"/> 91 91 <TopLine Value="773"/> 92 92 <CursorPos X="14" Y="786"/> 93 <UsageCount Value="2 8"/>93 <UsageCount Value="29"/> 94 94 <Loaded Value="True"/> 95 95 </Unit4> 96 96 <Unit5> 97 97 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\objpas\classes\streams.inc"/> 98 <EditorIndex Value=" 5"/>98 <EditorIndex Value="11"/> 99 99 <WindowIndex Value="0"/> 100 100 <TopLine Value="134"/> 101 101 <CursorPos X="26" Y="144"/> 102 <UsageCount Value="2 8"/>102 <UsageCount Value="29"/> 103 103 <Loaded Value="True"/> 104 104 </Unit5> … … 107 107 <EditorIndex Value="1"/> 108 108 <WindowIndex Value="0"/> 109 <TopLine Value=" 2798"/>110 <CursorPos X="1" Y=" 2808"/>111 <UsageCount Value="1 1"/>109 <TopLine Value="1672"/> 110 <CursorPos X="1" Y="1685"/> 111 <UsageCount Value="12"/> 112 112 <Loaded Value="True"/> 113 113 </Unit6> … … 115 115 <Filename Value="..\..\UStreamHelper.pas"/> 116 116 <UnitName Value="UStreamHelper"/> 117 <EditorIndex Value=" 3"/>117 <EditorIndex Value="9"/> 118 118 <WindowIndex Value="0"/> 119 119 <TopLine Value="192"/> 120 120 <CursorPos X="1" Y="205"/> 121 <UsageCount Value="1 1"/>121 <UsageCount Value="12"/> 122 122 <Loaded Value="True"/> 123 123 </Unit7> 124 <Unit8> 125 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\FPC\rtl\inc\mathh.inc"/> 126 <WindowIndex Value="0"/> 127 <TopLine Value="57"/> 128 <CursorPos X="18" Y="79"/> 129 <UsageCount Value="10"/> 130 </Unit8> 131 <Unit9> 132 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\buttoncontrol.inc"/> 133 <EditorIndex Value="6"/> 134 <WindowIndex Value="0"/> 135 <TopLine Value="14"/> 136 <CursorPos X="1" Y="22"/> 137 <UsageCount Value="11"/> 138 <Loaded Value="True"/> 139 </Unit9> 140 <Unit10> 141 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\buttons.inc"/> 142 <EditorIndex Value="7"/> 143 <WindowIndex Value="0"/> 144 <TopLine Value="320"/> 145 <CursorPos X="1" Y="342"/> 146 <UsageCount Value="11"/> 147 <Loaded Value="True"/> 148 </Unit10> 149 <Unit11> 150 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\include\wincontrol.inc"/> 151 <EditorIndex Value="2"/> 152 <WindowIndex Value="0"/> 153 <TopLine Value="5229"/> 154 <CursorPos X="38" Y="5239"/> 155 <UsageCount Value="11"/> 156 <Loaded Value="True"/> 157 </Unit11> 158 <Unit12> 159 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\lclmessageglue.pas"/> 160 <UnitName Value="LCLMessageGlue"/> 161 <EditorIndex Value="3"/> 162 <WindowIndex Value="0"/> 163 <TopLine Value="122"/> 164 <CursorPos X="1" Y="122"/> 165 <UsageCount Value="11"/> 166 <Loaded Value="True"/> 167 </Unit12> 168 <Unit13> 169 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32callback.inc"/> 170 <EditorIndex Value="4"/> 171 <WindowIndex Value="0"/> 172 <TopLine Value="2617"/> 173 <CursorPos X="1" Y="2617"/> 174 <UsageCount Value="11"/> 175 <Loaded Value="True"/> 176 </Unit13> 177 <Unit14> 178 <Filename Value="E:\Projekty2\FreePascalManager\trunk\Instance\1\Lazarus\lcl\interfaces\win32\win32wsstdctrls.pp"/> 179 <UnitName Value="Win32WSStdCtrls"/> 180 <EditorIndex Value="5"/> 181 <WindowIndex Value="0"/> 182 <TopLine Value="407"/> 183 <CursorPos X="1" Y="407"/> 184 <UsageCount Value="11"/> 185 <Loaded Value="True"/> 186 </Unit14> 124 187 </Units> 125 <JumpHistory Count=" 29" HistoryIndex="28">188 <JumpHistory Count="30" HistoryIndex="29"> 126 189 <Position1> 127 <Filename Value=" UMainForm.pas"/>128 <Caret Line=" 177" Column="1" TopLine="167"/>190 <Filename Value="..\..\UVarBlockSerializer.pas"/> 191 <Caret Line="244" Column="1" TopLine="236"/> 129 192 </Position1> 130 193 <Position2> 131 194 <Filename Value="..\..\UVarBlockSerializer.pas"/> 132 <Caret Line=" 302" Column="1" TopLine="289"/>195 <Caret Line="243" Column="1" TopLine="236"/> 133 196 </Position2> 134 197 <Position3> 135 198 <Filename Value="..\..\UVarBlockSerializer.pas"/> 136 <Caret Line=" 303" Column="1" TopLine="289"/>199 <Caret Line="244" Column="1" TopLine="236"/> 137 200 </Position3> 138 201 <Position4> 139 202 <Filename Value="..\..\UVarBlockSerializer.pas"/> 140 <Caret Line=" 304" Column="1" TopLine="289"/>203 <Caret Line="243" Column="1" TopLine="236"/> 141 204 </Position4> 142 205 <Position5> 143 206 <Filename Value="..\..\UVarBlockSerializer.pas"/> 144 <Caret Line=" 305" Column="1" TopLine="289"/>207 <Caret Line="244" Column="1" TopLine="236"/> 145 208 </Position5> 146 209 <Position6> 147 210 <Filename Value="..\..\UVarBlockSerializer.pas"/> 148 <Caret Line="2 26" Column="1" TopLine="213"/>211 <Caret Line="243" Column="1" TopLine="236"/> 149 212 </Position6> 150 213 <Position7> 151 214 <Filename Value="..\..\UVarBlockSerializer.pas"/> 152 <Caret Line=" 370" Column="1" TopLine="357"/>215 <Caret Line="244" Column="1" TopLine="236"/> 153 216 </Position7> 154 217 <Position8> 155 218 <Filename Value="..\..\UVarBlockSerializer.pas"/> 156 <Caret Line=" 371" Column="1" TopLine="357"/>219 <Caret Line="243" Column="1" TopLine="236"/> 157 220 </Position8> 158 221 <Position9> 159 222 <Filename Value="..\..\UVarBlockSerializer.pas"/> 160 <Caret Line=" 372" Column="1" TopLine="357"/>223 <Caret Line="244" Column="1" TopLine="236"/> 161 224 </Position9> 162 225 <Position10> 163 226 <Filename Value="..\..\UVarBlockSerializer.pas"/> 164 <Caret Line=" 374" Column="1" TopLine="357"/>227 <Caret Line="243" Column="1" TopLine="236"/> 165 228 </Position10> 166 229 <Position11> 167 230 <Filename Value="..\..\UVarBlockSerializer.pas"/> 168 <Caret Line=" 375" Column="1" TopLine="357"/>231 <Caret Line="244" Column="1" TopLine="236"/> 169 232 </Position11> 170 233 <Position12> 171 234 <Filename Value="..\..\UVarBlockSerializer.pas"/> 172 <Caret Line=" 385" Column="1" TopLine="372"/>235 <Caret Line="243" Column="1" TopLine="236"/> 173 236 </Position12> 174 237 <Position13> 175 238 <Filename Value="..\..\UVarBlockSerializer.pas"/> 176 <Caret Line=" 386" Column="1" TopLine="372"/>239 <Caret Line="244" Column="1" TopLine="236"/> 177 240 </Position13> 178 241 <Position14> 179 242 <Filename Value="..\..\UVarBlockSerializer.pas"/> 180 <Caret Line=" 387" Column="1" TopLine="372"/>243 <Caret Line="243" Column="1" TopLine="236"/> 181 244 </Position14> 182 245 <Position15> 183 246 <Filename Value="..\..\UVarBlockSerializer.pas"/> 184 <Caret Line=" 388" Column="1" TopLine="372"/>247 <Caret Line="244" Column="1" TopLine="236"/> 185 248 </Position15> 186 249 <Position16> 187 250 <Filename Value="..\..\UVarBlockSerializer.pas"/> 188 <Caret Line=" 390" Column="1" TopLine="375"/>251 <Caret Line="243" Column="1" TopLine="236"/> 189 252 </Position16> 190 253 <Position17> 191 254 <Filename Value="..\..\UVarBlockSerializer.pas"/> 192 <Caret Line=" 392" Column="1" TopLine="375"/>255 <Caret Line="244" Column="1" TopLine="236"/> 193 256 </Position17> 194 257 <Position18> 195 258 <Filename Value="..\..\UVarBlockSerializer.pas"/> 196 <Caret Line=" 393" Column="1" TopLine="375"/>259 <Caret Line="243" Column="1" TopLine="236"/> 197 260 </Position18> 198 261 <Position19> 199 262 <Filename Value="..\..\UVarBlockSerializer.pas"/> 200 <Caret Line=" 394" Column="1" TopLine="375"/>263 <Caret Line="244" Column="1" TopLine="236"/> 201 264 </Position19> 202 265 <Position20> 203 266 <Filename Value="..\..\UVarBlockSerializer.pas"/> 204 <Caret Line=" 395" Column="1" TopLine="375"/>267 <Caret Line="243" Column="1" TopLine="236"/> 205 268 </Position20> 206 269 <Position21> 207 270 <Filename Value="..\..\UVarBlockSerializer.pas"/> 208 <Caret Line=" 396" Column="1" TopLine="375"/>271 <Caret Line="244" Column="1" TopLine="236"/> 209 272 </Position21> 210 273 <Position22> 211 274 <Filename Value="..\..\UVarBlockSerializer.pas"/> 212 <Caret Line=" 402" Column="1" TopLine="389"/>275 <Caret Line="243" Column="1" TopLine="236"/> 213 276 </Position22> 214 277 <Position23> 215 278 <Filename Value="..\..\UVarBlockSerializer.pas"/> 216 <Caret Line=" 403" Column="18" TopLine="389"/>279 <Caret Line="244" Column="1" TopLine="236"/> 217 280 </Position23> 218 281 <Position24> 219 282 <Filename Value="..\..\UVarBlockSerializer.pas"/> 220 <Caret Line=" 405" Column="22" TopLine="389"/>283 <Caret Line="243" Column="1" TopLine="236"/> 221 284 </Position24> 222 285 <Position25> 223 286 <Filename Value="..\..\UVarBlockSerializer.pas"/> 224 <Caret Line=" 403" Column="29" TopLine="389"/>287 <Caret Line="244" Column="1" TopLine="236"/> 225 288 </Position25> 226 289 <Position26> 227 290 <Filename Value="..\..\UVarBlockSerializer.pas"/> 228 <Caret Line=" 108" Column="29" TopLine="97"/>291 <Caret Line="243" Column="1" TopLine="236"/> 229 292 </Position26> 230 293 <Position27> 231 294 <Filename Value="..\..\UVarBlockSerializer.pas"/> 232 <Caret Line=" 404" Column="17" TopLine="392"/>295 <Caret Line="244" Column="1" TopLine="236"/> 233 296 </Position27> 234 297 <Position28> 235 <Filename Value=" UMainForm.pas"/>236 <Caret Line=" 172" Column="1" TopLine="167"/>298 <Filename Value="..\..\UVarBlockSerializer.pas"/> 299 <Caret Line="243" Column="1" TopLine="236"/> 237 300 </Position28> 238 301 <Position29> 239 302 <Filename Value="..\..\UVarBlockSerializer.pas"/> 240 <Caret Line=" 405" Column="74" TopLine="392"/>303 <Caret Line="244" Column="1" TopLine="236"/> 241 304 </Position29> 305 <Position30> 306 <Filename Value="..\..\UVarBlockSerializer.pas"/> 307 <Caret Line="243" Column="1" TopLine="236"/> 308 </Position30> 242 309 </JumpHistory> 243 310 </ProjectOptions> … … 264 331 </CompilerOptions> 265 332 <Debugging> 266 <BreakPoints Count="1">267 <Item1>268 <Source Value="UMainForm.pas"/>269 <Line Value="172"/>270 </Item1>271 </BreakPoints>272 333 <Exceptions Count="3"> 273 334 <Item1> -
CoolStreaming/UVarBlockSerializer.pas
r174 r222 82 82 procedure WriteVarSInt(Index: Integer; Value: Int64); 83 83 function ReadVarSInt(Index: Integer): Int64; 84 procedure WriteVarFloat(Index: Integer; Value: Double );85 function ReadVarFloat(Index: Integer ): Double;84 procedure WriteVarFloat(Index: Integer; Value: Double; Base: Integer = 2); 85 function ReadVarFloat(Index: Integer; Base: Integer = 2): Double; 86 86 procedure WriteVarString(Index: Integer; Value: string); 87 87 function ReadVarString(Index: Integer): string; … … 657 657 end; 658 658 659 procedure TVarBlockIndexed.WriteVarFloat(Index: Integer; Value:Double );659 procedure TVarBlockIndexed.WriteVarFloat(Index: Integer; Value:Double; Base: Integer = 2); 660 660 begin 661 661 CheckItem(Index); 662 TVarBlockSerializer(Items[Index]).WriteVarFloat(Value );663 end; 664 665 function TVarBlockIndexed.ReadVarFloat(Index: Integer ):Double;662 TVarBlockSerializer(Items[Index]).WriteVarFloat(Value, Base); 663 end; 664 665 function TVarBlockIndexed.ReadVarFloat(Index: Integer; Base: Integer = 2):Double; 666 666 begin 667 667 TVarBlockSerializer(Items[Index]).Stream.Position := 0; 668 Result := TVarBlockSerializer(Items[Index]).ReadVarFloat ;668 Result := TVarBlockSerializer(Items[Index]).ReadVarFloat(Base); 669 669 end; 670 670
Note:
See TracChangeset
for help on using the changeset viewer.