info/SRC680_m66 : ์New: comphelper/optionalvalue.hxx
[email protected] Wed, 21 Sep 2005 13:09:03 +0200 (CEST)
| Newsgroups | gmane.comp.openoffice.announce.interface |
|---|---|
| Message-ID | <1350985.1127300943793.JavaMail.root@sd-web1> |
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]