CodeSnip Old Code (SVN)
A repository for source code snippets, designed with Pascal in mind.
Brought to you by:
delphidabbler
changed | /trunk/Src/USnippets.pas |
--- a/trunk/Src/USnippets.pas +++ b/trunk/Src/USnippets.pas @@ -157,6 +157,22 @@ Desc: string; // Description of categpry procedure Assign(const Src: TCategoryData); {Sets this record's fields to be same as another TCategoryData record. + @param Src [in] Record containing fields to be copied. + } + procedure Init; + {Initialises record to nul values. + } + end; + + { + TCategoryInfo: + Record that fully describes a category, i.e. contains all the required data. + } + TCategoryInfo = record + Name: string; // Name (unique id) of category + Data: TCategoryData; // Category's properties + procedure Assign(const Src: TCategoryInfo); + {Sets this record's fields to be same as another TCategoryInfo record. @param Src [in] Record containing fields to be copied. } procedure Init; @@ -2533,6 +2549,25 @@ Desc := ''; end; +{ TCategoryInfo } + +procedure TCategoryInfo.Assign(const Src: TCategoryInfo); + {Sets this record's fields to be same as another TCategoryInfo record. + @param Src [in] Record containing fields to be copied. + } +begin + Name := Src.Name; + Data.Assign(Src.Data); +end; + +procedure TCategoryInfo.Init; + {Initialises record to nul values. + } +begin + Name := ''; + Data.Init; +end; + { TSnippetIDListEx } constructor TSnippetIDListEx.Create(const Routines: TRoutineList);