The Classes
HTMLLabel
Derived from: none
Declared in: HTMLFile.h
HTMLLabel represents a label in an html file. Use them with HTMLFile.
Constructor and Destructor
Remark: You shouldn't need to construct HTMLLabels yourself. The HTMLFile will create them for you when it finds a label or a link, in its Search() method.
|
|
|
HTMLLabel(HTMLProject *proj, const char *fileName, const char *labelName, const char *labelText, unsigned int beacon=0)
|
HTMLLabel(const HTMLLabel*)
| |
Creates a new HTMLLabel. The first version creates a new label, with these parameters:
- proj is the HTMLProject the label is included into.
- fileName is the name of the file that contains the label, relative to proj's home path.
- labelName is the name of the label, i.e. the italic string in one of these tags: <a href="fileName#labelName"> or <a name="labelName">.
- labelText. This is the name of the label as seen by the user, i.e. the string between the <a href="..."> and </a> tags, (or <a name="..."> and </a> for a label)
- beacon is the number of the last found beacon before this label (0 if no beacon was found before)
The second version is a copy constructor.
Destroys the HTMLLabel object.
Member Functions
|
|
|
const char *FileName() const
| |
Returns the name of the html file that has the label.
This string is owned by the HTMLLabel. Don't destroy it.
Creates an HTMLFile associated to the file that contains the link. You keep the responsability for this object. You must destroy it after use.
|
|
|
const char *LabelName() const
| |
Returns the name of the label, i.e. the italic string in one of these tags: <a href="fileName#labelName"> or <a name="labelName">.
This string is owned by the HTMLLabel. Don't destroy it.
|
|
|
const char *LabelText() const
| |
Returns the label text. This is the name of the label as seen by the user, i.e. the string between the <a href="..."> and </a> tags (or <a name="..."> and </a> for a label).
This string is owned by the HTMLLabel. Don't destroy it.
Operators
!=, == (comparaison)
Compares the two HTMLLabels. == returns true if both HTMLLabel point to the same file, and have the same label.