stlab.adobe.com Adobe Systems Incorporated

iomanip_asl_cel.hpp

Go to the documentation of this file.
00001 /*
00002     Copyright 2005-2007 Adobe Systems Incorporated
00003     Distributed under the MIT License (see accompanying file LICENSE_1_0_0.txt
00004     or a copy at http://stlab.adobe.com/licenses.html)
00005 */
00006 
00007 /*************************************************************************************************/
00008 
00009 #ifdef ADOBE_STD_SERIALIZATION
00010 
00011 /*************************************************************************************************/
00012 
00013 #ifndef ADOBE_IOMANIP_ASL_CEL_HPP
00014 #define ADOBE_IOMANIP_ASL_CEL_HPP
00015 
00016 /*************************************************************************************************/
00017 
00018 #include <adobe/config.hpp>
00019 
00020 #include <adobe/iomanip.hpp>
00021 
00022 /*************************************************************************************************/
00023 
00024 namespace adobe {
00025 
00026 /*************************************************************************************************/
00027 
00029 class asl_cel_format : public format_base
00030 {
00031     typedef format_base inherited_t;
00032 
00033 public:
00034     typedef inherited_t::stream_type stream_type;
00035 
00036     explicit asl_cel_format(bool safe_strings) :
00037         escape_m(safe_strings)
00038     { }
00039 
00040     virtual void begin_format(stream_type& os);
00041 
00042     virtual void begin_bag(stream_type& os, const std::string& ident);
00043 
00044     virtual void begin_sequence(stream_type& os);
00045 
00046     virtual void begin_atom(stream_type& os, const any_regular_t&);
00047 
00048 private:
00049     virtual void stack_event(stream_type& os, bool is_push);
00050 
00051     void handle_atom(stream_type& os, bool is_push);
00052 
00053     bool escape_m;
00054 };
00055 
00056 /*************************************************************************************************/
00057 
00059 inline std::ostream& begin_asl_cel(std::ostream& os)
00060 {
00061     replace_pword<format_base, asl_cel_format>(os, format_base_idx(), true);
00062     return os << begin_format;
00063 }
00064 
00065 /*************************************************************************************************/
00066 
00068 inline std::ostream& end_asl_cel(std::ostream& os)
00069 { return os << end_format; }
00070 
00071 /*************************************************************************************************/
00072 
00074 inline std::ostream& begin_asl_cel_unsafe(std::ostream& os)
00075 {
00076     replace_pword<format_base, asl_cel_format>(os, format_base_idx(), false);
00077     return os << begin_format;
00078 }
00079 
00080 /*************************************************************************************************/
00081 
00083 inline std::ostream& end_asl_cel_unsafe(std::ostream& os)
00084 { return os << end_format; }
00085 
00086 /*************************************************************************************************/
00087 
00088 } // namespace adobe
00089 
00090 /*************************************************************************************************/
00091 
00092 #endif
00093 
00094 /*************************************************************************************************/
00095 
00096 #endif
00097 
00098 /*************************************************************************************************/

Copyright © 2006-2007 Adobe Systems Incorporated.

Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.

Search powered by Google