00001
00002
00003
00004
00005
00006
00008 #ifndef CPPCMS_BASE_VIEW_H
00009 #define CPPCMS_BASE_VIEW_H
00010
00011 #include <cppcms/defs.h>
00012
00013 #include <ostream>
00014 #include <sstream>
00015 #include <string>
00016 #include <map>
00017 #include <ctime>
00018 #include <memory>
00019
00020 #include <booster/hold_ptr.h>
00021 #include <cppcms/base_content.h>
00022 #include <booster/noncopyable.h>
00023 #include <cppcms/config.h>
00024
00025 namespace cppcms {
00026
00034
00035 class CPPCMS_API base_view : booster::noncopyable {
00036 public:
00040 virtual void render();
00041 virtual ~base_view();
00042
00043
00044 protected:
00045
00047
00048 base_view(std::ostream &out);
00049 std::ostream &out();
00050
00052
00053 private:
00054 struct _data;
00055 booster::hold_ptr<_data> d;
00056
00057 };
00058
00059 }
00060
00061
00062 #if defined(CPPCMS_HAVE_CPP_0X_AUTO)
00063 # define CPPCMS_TYPEOF(x) auto
00064 #elif defined(CPPCMS_HAVE_CPP_0X_DECLTYPE)
00065 # define CPPCMS_TYPEOF(x) decltype(x)
00066 #elif defined(CPPCMS_HAVE_GCC_TYPEOF)
00067 # define CPPCMS_TYPEOF(x) typeof(x)
00068 #elif defined(CPPCMS_HAVE_UNDERSCORE_TYPEOF)
00069 # define CPPCMS_TYPEOF(x) __typeof__(x)
00070 #else
00071 # define CPPCMS_TYPEOF(x) automatic_type_identification_is_not_supported_by_this_compiler
00072 #endif
00073
00074
00075 #endif