/** * An internal helper class to help convert between C and C++ APIs.
*/ template<typename CType, typename CPPType, int32_t kMagic> class IcuCApiHelper { public: /** * Convert from the C type to the C++ type (const version).
*/ staticconst CPPType* validate(const CType* input, UErrorCode& status);
/** * Convert from the C type to the C++ type (non-const version).
*/ static CPPType* validate(CType* input, UErrorCode& status);
/** * Convert from the C++ type to the C type (const version).
*/ const CType* exportConstForC() const;
/** * Convert from the C++ type to the C type (non-const version).
*/
CType* exportForC();
/** * Invalidates the object.
*/
~IcuCApiHelper();
private: /** * While the object is valid, fMagic equals kMagic.
*/
int32_t fMagic = kMagic;
};
template<typename CType, typename CPPType, int32_t kMagic>
IcuCApiHelper<CType, CPPType, kMagic>::~IcuCApiHelper() { // head off application errors by preventing use of of deleted objects.
fMagic = 0;
}
U_NAMESPACE_END
#endif// __CAPI_HELPER_H__
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.