stlab.adobe.com Adobe Systems Incorporated

iomanip_javascript.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_JAVASCRIPT_HPP
00014 #define ADOBE_IOMANIP_JAVASCRIPT_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 javascript_format : public format_base
00030 {
00031     typedef format_base inherited_t;
00032 
00033 public:
00034     typedef inherited_t::stream_type stream_type;
00035 
00036     virtual void begin_format(stream_type& os);
00037 
00038     virtual void begin_bag(stream_type& os, const std::string& ident);
00039 
00040     virtual void begin_sequence(stream_type& os);
00041 
00042     virtual void begin_atom(stream_type& os, const any_regular_t&);
00043 
00044 private:
00045     virtual void stack_event(stream_type& os, bool is_push);
00046 
00047     void handle_atom(stream_type& os, bool is_push);
00048 };
00049 
00050 /*************************************************************************************************/
00051 
00053 inline std::ostream& begin_javascript(std::ostream& os)
00054 {
00055     replace_pword<format_base, javascript_format>(os, format_base_idx());
00056     return os << begin_format;
00057 }
00058 
00059 /*************************************************************************************************/
00060 
00062 inline std::ostream& end_javascript(std::ostream& os)
00063 { return os << end_format; }
00064 
00065 /*************************************************************************************************/
00066 
00067 } // namespace adobe
00068 
00069 /*************************************************************************************************/
00070 
00071 #endif
00072 
00073 /*************************************************************************************************/
00074 
00075 #endif
00076 
00077 /*************************************************************************************************/

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