Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ uses
SbpBitOperations in '..\..\SimpleBaseLib\src\Misc\SbpBitOperations.pas',
SbpBinaryPrimitives in '..\..\SimpleBaseLib\src\Misc\SbpBinaryPrimitives.pas',
SbpSimpleBaseLibTypes in '..\..\SimpleBaseLib\src\Misc\SbpSimpleBaseLibTypes.pas',
SbpSimpleBaseLibExceptions in '..\..\SimpleBaseLib\src\Misc\SbpSimpleBaseLibExceptions.pas',
SbpBits in '..\..\SimpleBaseLib\src\Misc\SbpBits.pas',
SbpCharUtilities in '..\..\SimpleBaseLib\src\Utilities\SbpCharUtilities.pas',
SbpStreamUtilities in '..\..\SimpleBaseLib\src\Utilities\SbpStreamUtilities.pas',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,6 +353,7 @@
<DCCReference Include="..\..\SimpleBaseLib\src\Misc\SbpBitOperations.pas"/>
<DCCReference Include="..\..\SimpleBaseLib\src\Misc\SbpBinaryPrimitives.pas"/>
<DCCReference Include="..\..\SimpleBaseLib\src\Misc\SbpSimpleBaseLibTypes.pas"/>
<DCCReference Include="..\..\SimpleBaseLib\src\Misc\SbpSimpleBaseLibExceptions.pas"/>
<DCCReference Include="..\..\SimpleBaseLib\src\Misc\SbpBits.pas"/>
<DCCReference Include="..\..\SimpleBaseLib\src\Utilities\SbpCharUtilities.pas"/>
<DCCReference Include="..\..\SimpleBaseLib\src\Utilities\SbpStreamUtilities.pas"/>
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/Delphi.Tests/SimpleBaseLib.Tests.dpr
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ uses
SbpBitOperations in '..\..\SimpleBaseLib\src\Misc\SbpBitOperations.pas',
SbpBinaryPrimitives in '..\..\SimpleBaseLib\src\Misc\SbpBinaryPrimitives.pas',
SbpSimpleBaseLibTypes in '..\..\SimpleBaseLib\src\Misc\SbpSimpleBaseLibTypes.pas',
SbpSimpleBaseLibExceptions in '..\..\SimpleBaseLib\src\Misc\SbpSimpleBaseLibExceptions.pas',
SbpBits in '..\..\SimpleBaseLib\src\Misc\SbpBits.pas',
SbpCharUtilities in '..\..\SimpleBaseLib\src\Utilities\SbpCharUtilities.pas',
SbpStreamUtilities in '..\..\SimpleBaseLib\src\Utilities\SbpStreamUtilities.pas',
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base16/Base16Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpIBase16,
SbpBase16,
SbpBase16Alphabet,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base2/Base2Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpBase2,
SimpleBaseLibTestBase;

Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base32/Base32Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpIBase32,
SbpBase32,
SbpBase32Alphabet,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base45/Base45Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpBase45,
SimpleBaseLibTestBase;

Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base58/Base58Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpICodingAlphabet,
SbpBase58Alphabet,
SbpBase58,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base64/Base64Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpIBase64,
SbpBase64,
SimpleBaseLibTestBase;
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base8/Base8Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpBase8,
SimpleBaseLibTestBase;

Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Base85/Base85Tests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpBase85,
SimpleBaseLibTestBase;

Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Misc/CodingAlphabetTests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface
{$ENDIF FPC}
SbpCodingAlphabet,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SimpleBaseLibTestBase;

type
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib.Tests/src/Multibase/MultibaseTests.pas
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ interface
TestFramework,
{$ENDIF FPC}
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpMultibase,
SbpMultibaseEncoding,
SimpleBaseLibTestBase;
Expand Down
2 changes: 1 addition & 1 deletion SimpleBaseLib/src/Alphabets/SbpAliasedBase32Alphabet.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
interface

uses
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpCharMap,
SbpPaddingPosition,
SbpCharUtilities,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Alphabets/SbpCodingAlphabet.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface
uses
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpICodingAlphabet,
SbpCharUtilities;

Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase16.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
SysUtils,
Classes,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpICodingAlphabet,
SbpIBase16,
SbpIBaseStreamCoder,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
Classes,
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpIBase2,
SbpINonAllocatingBaseCoder,
SbpIBaseStreamCoder,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase32.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
Classes,
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpIBase32,
SbpIBaseStreamCoder,
SbpINonAllocatingBaseCoder,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase45.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
Classes,
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpSimpleBaseLibConstants,
SbpICodingAlphabet,
SbpINonAllocatingBaseCoder,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase64.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
Classes,
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpSimpleBaseLibConstants,
SbpIBase64,
SbpIBase64Alphabet,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase8.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
Classes,
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpIBase8,
SbpINonAllocatingBaseCoder,
SbpIBaseStreamCoder,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpBase85.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
Classes,
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpSimpleBaseLibConstants,
SbpIBase85,
SbpIBase85Alphabet,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpMoneroBase58.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface
uses
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpSimpleBaseLibConstants,
SbpICodingAlphabet,
SbpCodingAlphabet,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Bases/SbpMultibase.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface
uses
SysUtils,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpMultibaseEncoding,
SbpBase2,
SbpBase8,
Expand Down
1 change: 1 addition & 0 deletions SimpleBaseLib/src/Coders/SbpDividingCoder.pas
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ interface
SysUtils,
Math,
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions,
SbpSimpleBaseLibConstants,
SbpArrayUtilities,
SbpICodingAlphabet,
Expand Down
3 changes: 2 additions & 1 deletion SimpleBaseLib/src/Misc/SbpBits.pas
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
interface

uses
SbpSimpleBaseLibTypes;
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions;

resourcestring
SErrCountTooLarge = 'ACount too large to convert to UInt64';
Expand Down
31 changes: 31 additions & 0 deletions SimpleBaseLib/src/Misc/SbpSimpleBaseLibExceptions.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
unit SbpSimpleBaseLibExceptions;

{$I ..\Include\SimpleBaseLib.inc}

interface

uses
SysUtils;

type
ESimpleBaseLibException = class(Exception);
EInvalidCastSimpleBaseLibException = class(EInvalidCast);
EArithmeticSimpleBaseLibException = class(ESimpleBaseLibException);
EInvalidOperationSimpleBaseLibException = class(ESimpleBaseLibException);
EInvalidParameterSimpleBaseLibException = class(ESimpleBaseLibException);
EIndexOutOfRangeSimpleBaseLibException = class(ESimpleBaseLibException);
EArgumentSimpleBaseLibException = class(ESimpleBaseLibException);
EInvalidArgumentSimpleBaseLibException = class(ESimpleBaseLibException);
EArgumentNilSimpleBaseLibException = class(ESimpleBaseLibException);
EArgumentOutOfRangeSimpleBaseLibException = class(ESimpleBaseLibException);
ENullReferenceSimpleBaseLibException = class(ESimpleBaseLibException);
EUnsupportedTypeSimpleBaseLibException = class(ESimpleBaseLibException);
EIOSimpleBaseLibException = class(ESimpleBaseLibException);
EFormatSimpleBaseLibException = class(ESimpleBaseLibException);
ENotImplementedSimpleBaseLibException = class(ESimpleBaseLibException);
ENotSupportedSimpleBaseLibException = class(ESimpleBaseLibException);
EEndOfStreamSimpleBaseLibException = class(EIOSimpleBaseLibException);

implementation

end.
18 changes: 0 additions & 18 deletions SimpleBaseLib/src/Misc/SbpSimpleBaseLibTypes.pas
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,6 @@ interface

TSimpleBaseLibMethodPredicate<T> = function(Arg1: T): Boolean of object;

ESimpleBaseLibException = class(Exception);
EInvalidCastSimpleBaseLibException = class(EInvalidCast);
EArithmeticSimpleBaseLibException = class(ESimpleBaseLibException);
EInvalidOperationSimpleBaseLibException = class(ESimpleBaseLibException);
EInvalidParameterSimpleBaseLibException = class(ESimpleBaseLibException);
EIndexOutOfRangeSimpleBaseLibException = class(ESimpleBaseLibException);
EArgumentSimpleBaseLibException = class(ESimpleBaseLibException);
EInvalidArgumentSimpleBaseLibException = class(ESimpleBaseLibException);
EArgumentNilSimpleBaseLibException = class(ESimpleBaseLibException);
EArgumentOutOfRangeSimpleBaseLibException = class(ESimpleBaseLibException);
ENullReferenceSimpleBaseLibException = class(ESimpleBaseLibException);
EUnsupportedTypeSimpleBaseLibException = class(ESimpleBaseLibException);
EIOSimpleBaseLibException = class(ESimpleBaseLibException);
EFormatSimpleBaseLibException = class(ESimpleBaseLibException);
ENotImplementedSimpleBaseLibException = class(ESimpleBaseLibException);
ENotSupportedSimpleBaseLibException = class(ESimpleBaseLibException);
EEndOfStreamSimpleBaseLibException = class(EIOSimpleBaseLibException);

/// <summary>
/// Represents a dynamic array of Byte.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ contains
SbpBitOperations in '..\..\Misc\SbpBitOperations.pas',
SbpBinaryPrimitives in '..\..\Misc\SbpBinaryPrimitives.pas',
SbpSimpleBaseLibTypes in '..\..\Misc\SbpSimpleBaseLibTypes.pas',
SbpSimpleBaseLibExceptions in '..\..\Misc\SbpSimpleBaseLibExceptions.pas',
SbpBits in '..\..\Misc\SbpBits.pas',
SbpCharUtilities in '..\..\Utilities\SbpCharUtilities.pas',
SbpStreamUtilities in '..\..\Utilities\SbpStreamUtilities.pas',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<Description Value="SimpleBaseLib4Pascal as the name implies is a simple to use Base Encoding Package for Delphi/FreePascal Compilers that provides at the moment support for encoding and decoding various bases such as Base16, Base32 (various variants), Base58 (various variants), Base64 (various variants) and Base85 (various variants)."/>
<License Value="MIT License"/>
<Version Major="2" Minor="8"/>
<Files Count="66">
<Files Count="67">
<Item1>
<Filename Value="..\..\Coders\SbpDividingCoder.pas"/>
<UnitName Value="SbpDividingCoder"/>
Expand Down Expand Up @@ -293,6 +293,10 @@
<Filename Value="..\..\Include\SimpleBaseLibFPC.inc"/>
<Type Value="Include"/>
</Item66>
<Item67>
<Filename Value="..\..\Misc\SbpSimpleBaseLibExceptions.pas"/>
<UnitName Value="SbpSimpleBaseLibExceptions"/>
</Item67>
</Files>
<CompatibilityMode Value="True"/>
<RequiredPkgs Count="1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ interface
SbpSimpleBaseLibConstants, SbpBase85Alphabet, SbpIBase85Alphabet, SbpBase58,
SbpINumericBaseCoder, SbpBase32Alphabet, SbpINonAllocatingBaseCoder,
SbpIBaseStreamCoder, SbpIBaseCoder, SbpAliasedBase32Alphabet,
SbpIAliasedBase32Alphabet, SbpIBase32Alphabet,
SbpCharMap, SbpPaddingPosition, SbpCodingAlphabet, SbpBase45Alphabet,
SbpIAliasedBase32Alphabet, SbpIBase32Alphabet, SbpCharMap,
SbpPaddingPosition, SbpCodingAlphabet, SbpBase45Alphabet,
SbpIBase45Alphabet, SbpIDividingCoder, SbpBase62Alphabet, SbpBase58Alphabet,
SbpBase36Alphabet, SbpBase10Alphabet, SbpMoneroBase58, SbpBase62, SbpBase36,
SbpBase10, SbpBase16Alphabet, SbpIBase58, SbpIBase58Alphabet,
SbpIBase62Alphabet, SbpIBase36Alphabet, SbpIBase10Alphabet, SbpIBase62,
SbpIBase36, SbpIBase10, SbpSimpleBaseLibTypes, SbpICodingAlphabet,
SbpIBase16Alphabet, SbpArrayUtilities, SbpCharUtilities, SbpBits,
SbpBinaryPrimitives, SbpBitOperations;
SbpBinaryPrimitives, SbpBitOperations, SbpSimpleBaseLibExceptions;

implementation

Expand Down
3 changes: 2 additions & 1 deletion SimpleBaseLib/src/Utilities/SbpStreamUtilities.pas
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ interface
uses
Classes,
SysUtils,
SbpSimpleBaseLibTypes;
SbpSimpleBaseLibTypes,
SbpSimpleBaseLibExceptions;

resourcestring
SErrBlockSizeMustBePositive = 'Block size must be positive';
Expand Down