- 3. Creating a new project
3.5. File tags - 3.4.15. Advanced use
« Previous - 3.6. Templates
Next »
3.5. File tags
Below, you can find a description of all the tags available in the chapter files. Most of them takes a string as a value, but some of them also support a group of values (an array). We specify them in the following way:
TagName:
- Value 1
- Value 2
- Value 3
Basic tags
- Title
- a full title of the chapter (required tag)
- ShortTitle
-
Alternative version of the title, contrary to the name it does not need to be shorter. This tag is used by TypeFriendly in following situations:
- As a document title and in breadcrumbs,
- In tags: SeeAlso, Extends, Implements, ExtendedBy, ImplementedBy, Throws, MultiExtends and Arguments,
- As HTML "title" attribute in links to other chapters.
If not set, the value is taken from Title.
- SeeAlso
- an array of identifiers to generate the "See also" section.
- SeeAlsoExternal
- like above, but allows to put external URLs. The address can be separated with a space from the URL text.
- Author
- document author
Example:
Title: Function foo()
ShortTitle: foo()
SeeAlso:
- reference.functions.bar
SeeAlsoExternal:
- http://www.example.com/ A sample website
Document status
- Status
- displays a
Statusfield in the output with the specified text. It may be used for various purposes. - FeatureInformation
- prepends the specified content template to the beginning of a chapter. You can find out more about content templates here together with the example.
API References
These tags are very helpful for making various Application Programming Interface references: function, class definitions, interfaces etc.
- Construct
- the programming construct the chapter describes. You may either enter your own construct name or use the predefined one. In the second case, TypeFriendly automatically translates the construct name to the other languages and checks what others tags can be used.
- Note that this tag is not obligatory. If you do not use it, TypeFriendly does not perform any extra checks and validations.
- Type
- shows the element type (may be used for various purposes)
- Visibility
- the element visibility (public, private etc.)
- Extends
- base class.
- the tag cannot be used together with
MultiExtendsin the same chapter - expects the identifier of a chapter that describes the base class
EExtendsexpects the plain class name that does not have its own chapter in the documentation.- MultiExtends
- base classes (for languages that support multiple inheritance).
- the tag cannot be used together with
Extendsin the same chapter - expects the list of chapter identifiers that describe the base classes.
EMultiExtendsexpects the list of plain class names that do not have their own chapters in the documentation.- Implements
- implemented interfaces (for languages that support interfaces)
- expects the list of chapter identifiers that describe the interfaces.
EImplementsexpects the list of plain interface names that do not have their own chapters in the documentation.- ExtendedBy
- derived classes.
- expects the list of chapter identifiers that describe the classes that extend the current one.
EExtendedByexpects the list of plain class names that do not have their own chapters in the documentation.- ImplementedBy
- classes implementing the specified interface.
- expects the list of chapter identifiers that describe the classes that implement the current interface.
EImplementedByexpects the list of plain class names that do not have their own chapters in the documentation.- Throws
- the exceptions thrown.
- expects the list of chapter identifiers that describe the thrown exception classes.
EThrowsexpects the list of plain exception class names that do not have their own chapters in the documentation.- Reference
- the function reference, i.e.
void foo(int a, int b [, int c]) - Arguments
- the list of function/method arguments
- the expected argument format:
Name: arg_name | Type: arg.type.chapter | EType: arg_type_name | Desc: argument description - the
TypeandETypetags are optional, however - if you decide to use them, they must be specified in all the arguments. - Returns
- the description what the function or method returns.
- File
- the file that contains the described item.
- Files
- the list of file names
- variant of
Filethat allows to specify more file names.
Sample use:
Title: Class "foo"
Construct: class
Extends: reference.bar
Implements:
- reference.foo-interface
- reference.bar-interface
ExtendedBy:
- reference.joe
As you can see, the tags require the chapter identifiers by default. To specify the classes, interfaces etc. that are defined by some external libraries and your book does not cover them, you may use the extra tags prepended with the E letter:
Title: Class "foo"
EExtends: PDO
Implements:
- reference.my-interface
EImplements:
- Countable
- IteratorAggregate
As you can see, both of the versions can be used simultaneously in the same chapter.
The available predefined programming constructs for Construct tag:
class- a classinterface- an interfaceabstract class- an abstract classfunction- a functionmethod- a methodstatic method- a static methodabstract method- an abstract methodaccessor method- an accessor method (i.e.setSomething(),getSomething()).constructor- a class constructordestructor- a class destructormagic method- a magic method (i.e.__call()in PHP)variable- a variablestatic variable- a static variablemodule- a modulepackage- a packagenamespace- a namespacedatatype- a datatypestructure- a structure (like in C or C++)macro- a macro
Version control tags
Information about the versions and version control.
- VCSKeywords
- specified a place where the version control system keywords can be expanded. The content of this tag is displayed in the output, if the
versionControlInfooption is enabled in the project configuration. - VersionSince
- the first version that contains the described item
- VersionTo
- the last version that contains the described item
Sample use of the tags:
Title: A sample page
VCSKeywords: $Id$
VersionSince: 1.0.2
VersionTo: 1.4.6
Now the version control systems, like Subversion, can expand their special keywords in the header, and moreover, if we enable one option, such information will be included in the generated output.
Document type tags
These are functional tags that help TypeFriendly to determine the chapter type.
- Appendix
- accepts a boolean value (true, false, yes, no). The tag helps creating appendices, providing the alphabetical enumeration for them according to the ordinary chapter order settings, and prepends the "Appendix" word to the title.
- 3.5. File tags
3. Creating a new project - « Previous
3.4.15. Advanced use - Next »
3.6. Templates