|
From: Foster B. <fos...@us...> - 2005-04-07 00:53:33
|
Update of /cvsroot/adobe-source/sandbox/adobe-source/adobe In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25640/adobe Added Files: xstr.hpp Log Message: xstr initial commmit. --- NEW FILE: xstr.hpp --- /* Copyright 2005 Adobe Systems Incorporated Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt or a copy at http://opensource.adobe.com/licenses.html) */ /*************************************************************************************************/ #ifndef ADOBE_XSTR_HPP #define ADOBE_XSTR_HPP /*************************************************************************************************/ #include <adobe/name_fwd.hpp> #include <adobe/dictionary_fwd.hpp> #include <adobe/algorithm.hpp> /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ class xstr_t; /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ #if !defined(ADOBE_NO_DOCUMENTATION) void swap(adobe::xstr_t& x, adobe::xstr_t& y); #endif /*************************************************************************************************/ namespace adobe { /*************************************************************************************************/ class xstr_t { public: typedef std::pair<const char*, const char*> parse_range_t; explicit xstr_t(const char* xstr); xstr_t(const char* xstr, std::size_t n); xstr_t(const char* xstr, std::size_t n, const adobe::dictionary_t& context); #if !defined(ADOBE_NO_DOCUMENTATION) xstr_t(const xstr_t& rhs); ~xstr_t(); xstr_t& operator = (const xstr_t& rhs); #endif const char* get() const; static void assign_glossary(const parse_range_t& parse_range); static void append_glossary(const parse_range_t& parse_range); static void set_default_context(const adobe::dictionary_t& context); static adobe::dictionary_t get_default_context(); private: #if !defined(ADOBE_NO_DOCUMENTATION) friend void ::swap(adobe::xstr_t& x, adobe::xstr_t& y); struct implementation_t; implementation_t* object_m; #endif }; /*************************************************************************************************/ } // namespace adobe /*************************************************************************************************/ #if !defined(ADOBE_NO_DOCUMENTATION) inline void swap(adobe::xstr_t& x, adobe::xstr_t& y) { adobe::swap(x.object_m, y.object_m); } #endif /*************************************************************************************************/ #endif /*************************************************************************************************/ |