Skip to content

Commit d341d3e

Browse files
committed
cleanup of formatting
1 parent 9de2795 commit d341d3e

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

docs/properties.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ The following types are available for properties
3434

3535
Setting an value:
3636

37-
```c++
37+
```cpp
3838
anObject.property = value;
3939
anObject.property(value);
4040
anObject.property.set(value);
4141
```
4242

4343
Getting a value:
4444

45-
```C++
45+
```cpp
4646
value = anObject.property;
4747
value = anObject.property();
4848
value = anObject.property.get();
@@ -71,7 +71,7 @@ These property objects define a typed property and provided storage for this pro
7171

7272
Within the definition of the class the property is for, the property is defined using the following pattern:
7373

74-
```C++
74+
```cpp
7575
flxPropertyType<ClassName> property_name = {optional initial value, optional data limit};
7676
```
7777
@@ -95,7 +95,7 @@ Available Property Types:
9595
9696
#### Example
9797
98-
```C++
98+
```cpp
9999
class MyClass : public flxObject
100100
{
101101
public:
@@ -111,7 +111,7 @@ The initial value for a property can be set in it's declaration statement by ass
111111

112112
In the above example, setting an initial value of 42 to _my_property_ looks like:
113113

114-
```C++
114+
```cpp
115115
class MyClass : public flxObject
116116
{
117117
public:
@@ -127,7 +127,7 @@ When an instance of the object that contains the property is created, the proper
127127
128128
The calling sequence for flxRegister is:
129129
130-
```C++
130+
```cpp
131131
flxRegister(Object [, Name][,Description]);
132132
```
133133

@@ -139,7 +139,7 @@ Where:
139139

140140
For the example above, the registration call looks like:
141141

142-
```C++
142+
```cpp
143143
// MyClass Constructor
144144
MyClass()
145145
{
@@ -160,7 +160,7 @@ By calling methods on read and write of the property, the Read/Write property ob
160160

161161
Within the definition of a class the property is for, the property is defined using the following pattern:
162162

163-
```C++
163+
```cpp
164164
flxPropertyRWType<ClassName, &ClassName::Getter, &ClassName::Setter> property_name;
165165
```
166166

@@ -176,7 +176,7 @@ Where:
176176
* flxPropertyRWBool - bool property
177177
* flxPropertyRWInt8 - integer 8 property
178178
* flxPropertyRWInt16 - integer 16 property
179-
* flxPropertyRWInt32 - integer3 property
179+
* flxPropertyRWInt32 - integer32 property
180180
* flxPropertyRWUInt8 - unsigned 8 integer
181181
* flxPropertyRWUInt16 - unsigned 16 integer
182182
* flxPropertyRWUInt32 - unsigned 32 integer
@@ -188,7 +188,7 @@ Where:
188188

189189
These methods are implemented on the containing class and are called when the value of a property is requested. These methods have the following signature:
190190

191-
```C++
191+
```cpp
192192
property_type ClassName::get_Name(void);
193193
```
194194
@@ -204,7 +204,7 @@ Note
204204
205205
These methods are implemented on the containing class and are called when the value of a property is set. These methods have the following signature:
206206
207-
```C++
207+
```cpp
208208
void ClassName::set_Name(property_type value);
209209
```
210210

@@ -218,7 +218,7 @@ Note
218218
219219
#### Example {#rw-props-example}
220220

221-
```C++
221+
```cpp
222222
class MyClass2 : public flxObject
223223
{
224224
private:
@@ -232,7 +232,7 @@ public:
232232
}
233233
```
234234
235-
Note
235+
> [!note]
236236
>
237237
> * By convention the getters and setters are declared as private. This can be optional
238238
> * The getter and setter methods must be declared before defining the property
@@ -245,7 +245,7 @@ When an instance of the object that contains the property is created, the proper
245245
246246
The calling sequence for flxRegister is:
247247
248-
```C++
248+
```cpp
249249
flxRegister(Object [, Name][,Description]);
250250
```
251251

@@ -257,7 +257,7 @@ Where:
257257

258258
For the example above, the registration call looks like:
259259

260-
```C++
260+
```cpp
261261
// MyClass Constructor
262262
MyClass2()
263263
{
@@ -283,7 +283,7 @@ Additionally, the method `clearDataLimit()` can be called to delete the current
283283

284284
A range examples for properties:
285285

286-
```C++
286+
```cpp
287287
// System sleep properties
288288
flxPropertyUint<sfeDataLogger> sleepInterval = {5, 86400};
289289

@@ -294,7 +294,7 @@ A range examples for properties:
294294
295295
If providing an initial value, the declaration has the form ```{initial value, min, max}```.
296296
297-
```C++
297+
```cpp
298298
// Define a Property with an initial value of
299299
// 1, and a range of -29 to 144
300300
flxPropertyInInt<MyClass, &MyClass::write_MyInput> my_input = { 01, -28, 144 };
@@ -304,7 +304,7 @@ To set/change the range value at runtime, the method ```setDataLimitRange(min, m
304304

305305
For Example:
306306

307-
```C++
307+
```cpp
308308
// change the data range
309309
my_input.setDataLimitRange(100, 198);
310310
```
@@ -317,7 +317,7 @@ This represents data limit provides a defined set of valid values for the proper
317317

318318
To set the valid values at property definition, just set the declared property to the range using a C++ initializer list of name value pairs:
319319

320-
```
320+
```cpp
321321
{
322322
{ NAME0, value0},
323323
{ NAME1, value1},
@@ -327,7 +327,7 @@ To set the valid values at property definition, just set the declared property t
327327
328328
An example of a Valid Value Set - note an initial value is provided in this example:
329329
330-
```C++
330+
```cpp
331331
332332
// Define our read-write properties
333333
// binaryGas is STC3X_binary_gas_type_e. Default is STC3X_BINARY_GAS_CO2_AIR_25
@@ -348,15 +348,15 @@ Additionally, the method `clearDataLimit()` can be called to delete the current
348348

349349
Simple Example:
350350

351-
```C++
351+
```cpp
352352
// Add valid values ...
353353
my_property.addDataLimitValidValue("ONE K", 100.);
354354
my_property.addDataLimitValidValue("ONE K", 100.);
355355
```
356356

357357
Or for an entire parameter list:
358358

359-
```C++
359+
```cpp
360360
my_property.addDataLimitValidValue( {
361361
{"Value One", 22},
362362
{"Value Two", 44},

0 commit comments

Comments
 (0)