Skip to content

Commit 9998f4e

Browse files
committed
Corrected comments for some methods of TREMLEntities
The comments for both TREMLEntities.MapToEntity and the private TREMLEntities.CharToMnemonicEntity methods were changed to reflect their actual functions. Fixes #84
1 parent 46ae69b commit 9998f4e

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

Diff for: Src/UREMLDataIO.pas

+17-20
Original file line numberDiff line numberDiff line change
@@ -281,12 +281,15 @@ TREMLEntity = record
281281
}
282282
end;
283283
class var fEntityMap: array of TREMLEntity; // Entity <=> character map
284+
285+
/// <summary>Attempts to map a character to an associated mnemonic
286+
/// character entity, without the surrounding <c>&amp;</c> and <c>;</c>
287+
/// characters.</summary>
288+
/// <param name="Ch"><c>Char</c> [in] Character to be mapped.</param>
289+
/// <returns><c>string</c>. The associated mnemonic entity or an empty
290+
/// string if not such entity exists.</returns>
284291
class function CharToMnemonicEntity(const Ch: Char): string;
285-
{Gets the mnemonic character entity that represents a character.
286-
@param Entity [in] Character for which equivalent entity is required.
287-
@return Required entity or '' if character has no matching mnemonic
288-
entity.
289-
}
292+
290293
class function GetCount: Integer; static;
291294
{Read accessor for Count property.
292295
@return Number of supported tags.
@@ -309,13 +312,16 @@ TREMLEntity = record
309312
class destructor Destroy;
310313
{Class destructor. Clears entity map
311314
}
315+
316+
/// <summary>Attempts to map a character to a character enitity, without
317+
/// the surrounding <c>&amp;</c> and <c>;</c> characters.</summary>
318+
/// <param name="Ch"><c>Char</c> [in] Character to be mapped.</param>
319+
/// <returns><c>string</c>. A mnemonic entity if one exists for <c>Ch</c>.
320+
/// Otherwise if <c>Ch</c> is not a printable ASCII character a numeric
321+
/// entity is returned. If <c>Ch</c> is a printable ASCII character an
322+
/// empty string is returned.</returns>
312323
class function MapToEntity(const Ch: Char): string;
313-
{Maps a character to a character entity if appropriate.
314-
@param Ch [in] Character to be mapped.
315-
@return Mnemonic entity if one exists, character itself if it is
316-
printable and has ascii value less than 127, or a numeric character
317-
otherwise.
318-
}
324+
319325
class property Count: Integer read GetCount;
320326
{Number of supported tags}
321327
class property Entities[Idx: Integer]: string read GetEntity;
@@ -1013,10 +1019,6 @@ constructor TREMLTags.TREMLTag.Create(const AId: TActiveTextActionElemKind;
10131019
{ TREMLEntities }
10141020

10151021
class function TREMLEntities.CharToMnemonicEntity(const Ch: Char): string;
1016-
{Gets the mnemonic character entity that represents a character.
1017-
@param Entity [in] Character for which equivalent entity is required.
1018-
@return Required entity or '' if character has no matching mnemonic entity.
1019-
}
10201022
var
10211023
Idx: Integer; // loops thru table of entity / characters
10221024
begin
@@ -1112,11 +1114,6 @@ class function TREMLEntities.GetEntity(Idx: Integer): string;
11121114
end;
11131115

11141116
class function TREMLEntities.MapToEntity(const Ch: Char): string;
1115-
{Maps a character to a character entity if appropriate.
1116-
@param Ch [in] Character to be mapped.
1117-
@return Mnemonic entity if one exists, character itself if it is printable
1118-
and has ascii value less than 127, or a numeric character otherwise.
1119-
}
11201117
begin
11211118
Result := CharToMnemonicEntity(Ch);
11221119
if (Result = '') and ( (Ord(Ch) <= 31) or (Ord(Ch) >= 127) ) then

0 commit comments

Comments
 (0)