CppCMS

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

base_view.h
1 //
3 // Copyright (C) 2008-2012 Artyom Beilis (Tonkikh) <artyomtnk@yahoo.com>
4 //
5 // See accompanying file COPYING.TXT file for licensing details.
6 //
8 #ifndef CPPCMS_BASE_VIEW_H
9 #define CPPCMS_BASE_VIEW_H
10
11 #include <cppcms/defs.h>
12
13 #include <ostream>
14 #include <sstream>
15 #include <string>
16 #include <map>
17 #include <ctime>
18 #include <booster/auto_ptr_inc.h>
19
20 #include <booster/hold_ptr.h>
21 #include <cppcms/base_content.h>
22 #include <booster/noncopyable.h>
23 #include <cppcms/config.h>
24
25 namespace cppcms {
26
34
35 class CPPCMS_API base_view : booster::noncopyable {
36 public:
40 virtual void render();
41 virtual ~base_view();
42
43
44 protected:
45
47
48 base_view(std::ostream &out);
49 std::ostream &out();
50
52
53 private:
54 struct _data;
55 booster::hold_ptr<_data> d;
56
57 };
58
59 } // cppcms
60
61
62 #if defined __clang__
63 # if __has_feature(cxx_auto_type)
64 # define CPPCMS_HAVE_AUTO_TYPE
65 # endif
66 #elif defined __GNUC__
67 # if (__GNUC__ >= 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__)
68 # define CPPCMS_HAVE_AUTO_TYPE
69 # endif
70 #elif defined _MSC_VER
71 # if _MSC_VER >= 1600
72 # define CPPCMS_HAVE_AUTO_TYPE
73 # endif
74 #elif defined __INTEL_COMPILER
75 # if __INTEL_COMPILER >= 1200 && defined(__GXX_EXPERIMENTAL_CXX0X__)
76 # define CPPCMS_HAVE_AUTO_TYPE
77 # endif
78 #elif defined CPPCMS_HAVE_CPP_0X_AUTO // detected at compilation stage
79 # define CPPCMS_HAVE_AUTO_TYPE
80 #endif
81
82
83 #if defined(CPPCMS_HAVE_AUTO_TYPE)
84 # define CPPCMS_TYPEOF(x) auto
85 #elif defined(CPPCMS_HAVE_CPP_0X_DECLTYPE)
86 # define CPPCMS_TYPEOF(x) decltype(x)
87 #elif defined(CPPCMS_HAVE_GCC_TYPEOF)
88 # define CPPCMS_TYPEOF(x) typeof(x)
89 #elif defined(CPPCMS_HAVE_UNDERSCORE_TYPEOF)
90 # define CPPCMS_TYPEOF(x) __typeof__(x)
91 #else
92 # define CPPCMS_TYPEOF(x) automatic_type_identification_is_not_supported_by_this_compiler
93 #endif
94
95
96 #endif
booster::hold_ptr< _data >
cppcms
This is the namespace where all CppCMS functionality is placed.
Definition: application.h:19
cppcms::base_view
This class is base class for all views (skins) rendered by CppCMS template engine.
Definition: base_view.h:35
booster::noncopyable
This class makes impossible to copy any class derived from this one.
Definition: noncopyable.h:15