... | ... | @@ -12,9 +12,25 @@ That proxy will add to the property `<name1>....<name n>` the property `<name1>. |
|
|
|
|
|
# Examples
|
|
|
|
|
|
Property documentation is done through a [proxy](https://en.wikipedia.org/wiki/Proxy_pattern) object
|
|
|
|
|
|
### Inside the `fargOCA::ConfigLoader` class methods
|
|
|
|
|
|
This is probably the best place to document the properties as they are already organized by theme. The proxy is returned by the `doc` member.
|
|
|
|
|
|
```
|
|
|
ConfigLoader::extractSomething(ptree const& cfg) const {
|
|
|
....
|
|
|
doc(cfg, "Disk.Section.Param") << "This parameter blah blah...";
|
|
|
...
|
|
|
return something;
|
|
|
}
|
|
|
```
|
|
|
### Inside the `fargOCA::Parameters` class methods
|
|
|
|
|
|
This is the most common case at this point. The proxy object is returned by the `documentation` method:
|
|
|
We are moving away from this, but just in case...
|
|
|
|
|
|
The proxy object is returned by the `documentation` method:
|
|
|
|
|
|
```
|
|
|
documentation("Disk.Foo.Bar") << "This property is used blah blah blah.";
|
... | ... | @@ -22,7 +38,7 @@ This is the most common case at this point. The proxy object is returned by the |
|
|
|
|
|
### Outside
|
|
|
|
|
|
The proxy can alway be directly instantiated:
|
|
|
The proxy can always be directly instantiated:
|
|
|
```
|
|
|
PropertyDocProxy(cfg, std::cerr, "Disk.Foo.Bar")
|
|
|
<< "This Property bla blah...";
|
... | ... | |