| Type | info |
| Title | ์New: comphelper/optionalvalue.hxx |
| Posted by | [EMAIL PROTECTED] |
| Affected | ,comphelper |
| Effective from | SRC680_m66 |
Summary
+comphelper/optionalvalue.hxx
Description
Newly introduced is the template OptionalValue, which provides
'optionality' for the given value type.
Especially for PODs, optionality either needs to be achieved by
special 'magic' values (i.e. an int value is not set when -1 etc.), or
an additional bool denoting value validity. This template encapsulates
the latter into an atomic data type.
Note that the concept of optionality is shared with uno::Any, but
there, the focus is on being able to hold 'anything', even void (and
thus, uno::Any is more heavyweight than this approach). Because of
this similarity, two methods exportValue and importValue are provided,
which handle conversion from and to uno::Any.
A possible improvement (to be discussed) might even be to overload
operator>>=/operator<<= for OptionalValue and uno::Any.
For further details, please refer to the inline documentation in
comphelper/optionalvalue.hxx.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
