13. Context Methods

Aus Hugo Doku

Wechseln zu: Navigation, Suche

Context methods are those methods, which you use in output methods. They are called "context methods" because they write in the context of the output method, e.g. on the slot position of a stream or a file.

All context methods are called with a preceding "@#".

13.1. coding

@#coding<![flag, ]coding_id, [uuid ] !>

Description:

Inserts a coding block . The coding, which is written manually at this position in the generated file, will remain, even if you start the generator again.

The coding will be marked in the target generated file by surrounding comments.

Parameter:

Name Type Meaning
flag boolean Flag, if set to true, the function is called, otherwise not. (Default-Value: true)
coding_id String The name of the coding, which is placed on this point.

The coding is saved in the repose path with the given name attaced to the filename. As long as you do not rename your file you can access to the coding even if you delete temporarily the coding instruction in your frame and rewrite it later.

uuid String Uses the given UUID (Universally Unfied IDentifier) for identifing the coding passage instead of a name (coding_id).

The advantage is, that you do not loose the coding even if you rename your file.

The disadvantag is, that it normally isn't as much readable than coding_id is. Because the UUID is normally generated by an automatism within the .model file. One automatism, you can use, is at the .filter file the uuid parameter. Another possiblity, which is often used, is that an editor for your .model files fullfills UUID at the model elements.


Next: 13.2. coding_start
Persönliche Werkzeuge