Browse Source

* Extend examples

Michaël Van Canneyt 2 weeks ago
parent
commit
6d7d859aa0
2 changed files with 20 additions and 2 deletions
  1. 8 1
      utils/fpdoc/examples/simple/testunit.pp
  2. 12 1
      utils/fpdoc/examples/simple/testunit.xml

+ 8 - 1
utils/fpdoc/examples/simple/testunit.pp

@@ -18,6 +18,10 @@ Const
   ARecordConst : TMethod = (Code:Nil;Data:Nil);
   ASetConst = [true,false];
   ADeprecatedConst = 1 deprecated;
+
+resourcestring
+  String1 = 'Resource string 1';
+  String2 = 'Resource string 2';
    
 Type
   TAnEnumType         = (one,two,three);
@@ -48,6 +52,7 @@ Type
   
   Private
     Const aconst = 123;
+  private  
     X22 : Integer;
     Procedure SetX(AValue : Integer);
     Function GetX : Integer;
@@ -60,7 +65,8 @@ Type
   end;
   TAExtRecordType        = Record
     Const X = 100;
-    operator assign(Y : Integer) : TAExtRecordType;
+  public  
+    class operator assign(Y : Integer) : TAExtRecordType;
   end;
                         
 Var
@@ -125,6 +131,7 @@ Type
     Procedure AStringMessageProc(Var Msg); Message '123';
     Procedure ADeprecatedProc; deprecated;
     Procedure APlatformProc; Platform;
+    function MyFunc : Integer; 
     Property IntProp : Integer Read FI Write Fi;
     Property IntROProp : Integer Read FI;
     Property GetIntProp : Integer Read ReadI Write WriteI;

+ 12 - 1
utils/fpdoc/examples/simple/testunit.xml

@@ -17,6 +17,15 @@ We have here a description
   <note>Unit note</note>
 </notes>
 
+<topic name="MyTopic">
+<short>A short topic</short>
+<descr>Longer text for the topic</descr>
+<seealso>
+<link id="AnIntegerConst"/>
+</seealso>
+</topic>
+
+
 <!-- constant Visibility: default -->
 <element name="AnIntegerConst">
 <short>Aha this is not me</short>
@@ -107,6 +116,7 @@ Appears in 2.0
 <element name="TAnEnumType">
 <short></short>
 <descr>
+Some longer description of the type.
 </descr>
 <version>
 Appears in 2.0
@@ -144,8 +154,9 @@ Appears in 2.0
 
 <!-- array type Visibility: default -->
 <element name="TAnArrayType">
-<short></short>
+<short>Short description</short>
 <descr>
+We have a longer description.
 </descr>
 <seealso>
 </seealso>