Adobe Source Libraries 2.0.0
A collection of C++ libraries.
Loading...
Searching...
No Matches
iomanip_javascript.hpp
Go to the documentation of this file.
1/*
2 Copyright 2013 Adobe
3 Distributed under the Boost Software License, Version 1.0.
4 (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5*/
6/**************************************************************************************************/
7
8#ifdef ADOBE_STD_SERIALIZATION
9
10/**************************************************************************************************/
11
12#ifndef ADOBE_IOMANIP_JAVASCRIPT_HPP
13#define ADOBE_IOMANIP_JAVASCRIPT_HPP
14
15/**************************************************************************************************/
16
17#include <adobe/config.hpp>
18
19#include <adobe/iomanip.hpp>
20
21/**************************************************************************************************/
22
23namespace adobe {
24
25/**************************************************************************************************/
26
28class javascript_format : public format_base {
29 typedef format_base inherited_t;
30
31public:
32 typedef inherited_t::stream_type stream_type;
33
34 virtual void begin_format(stream_type& os);
35
36 virtual void begin_bag(stream_type& os, const std::string& ident);
37
38 virtual void begin_sequence(stream_type& os);
39
40 virtual void begin_atom(stream_type& os, const serializable_t&);
41
42private:
43 virtual void stack_event(stream_type& os, bool is_push);
44
45 void handle_atom(stream_type& os, bool is_push);
46};
47
48/**************************************************************************************************/
49
51std::ostream& begin_javascript(std::ostream& os);
52
54std::ostream& end_javascript(std::ostream& os);
55
56/**************************************************************************************************/
57
58} // namespace adobe
59
60/**************************************************************************************************/
61
62#endif
63
64/**************************************************************************************************/
65
66#endif
67
68/**************************************************************************************************/