Browse Source

Significant documentation updates, added examples

to doxygen generation
master
Artyom Beilis 12 years ago
parent
commit
610d1059cb
37 changed files with 517 additions and 185 deletions
  1. +6
    -6
      Doxyfile
  2. +7
    -7
      booster/booster/aio/aio_category.h
  3. +1
    -1
      booster/booster/aio/stream_socket.h
  4. +4
    -2
      booster/booster/backtrace.h
  5. +2
    -2
      booster/booster/locale/boundary/index.h
  6. +1
    -1
      booster/booster/locale/collator.h
  7. +2
    -2
      booster/booster/locale/conversion.h
  8. +1
    -1
      booster/booster/locale/date_time.h
  9. +2
    -2
      booster/booster/locale/format.h
  10. +5
    -3
      booster/booster/log.h
  11. +3
    -1
      booster/booster/nowide/fstream.h
  12. +1
    -1
      booster/booster/regex_match.h
  13. +0
    -2
      booster/booster/shared_object.h
  14. +1
    -1
      cppcms/crypto.h
  15. +2
    -0
      cppcms/filters.h
  16. +9
    -9
      cppcms/form.h
  17. +9
    -7
      cppcms/json.h
  18. +4
    -2
      cppcms/mount_point.h
  19. +14
    -3
      cppcms/rpc_json.h
  20. +16
    -8
      cppcms/serialization_classes.h
  21. +1
    -1
      cppcms/session_cookies.h
  22. +1
    -1
      cppcms/session_storage.h
  23. +3
    -1
      cppcms/steal_buf.h
  24. +1
    -1
      cppcms/url_mapper.h
  25. +1
    -3
      cppcms/views_pool.h
  26. +5
    -1
      doc/mainpage.doxy
  27. +322
    -0
      examples/autogenerated.doxy
  28. +0
    -23
      examples/basic_cache/basic_cache.doxy
  29. +0
    -15
      examples/chat/chat.doxy
  30. +20
    -0
      examples/examples.txt
  31. +70
    -0
      examples/format.sh
  32. +0
    -15
      examples/forms/forms.doxy
  33. +0
    -22
      examples/hello_world/hello_world.doxy
  34. +0
    -5
      examples/json/json.doxy
  35. +0
    -19
      examples/json_rpc/json_rpc.doxy
  36. +0
    -15
      examples/json_rpc_chat/json_rpc_chat.doxy
  37. +3
    -2
      tools/boost_to_booster

+ 6
- 6
Doxyfile View File

@@ -466,7 +466,7 @@ INPUT = cppcms \
booster/booster/aio \
booster/booster/locale \
booster/booster/nowide \
noicu/cppcms \
booster/booster/smart_ptr \
examples

# If the value of the INPUT tag contains directories, you can use the
@@ -476,14 +476,13 @@ INPUT = cppcms \
# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py

FILE_PATTERNS = *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx \
*.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.doxy
FILE_PATTERNS = *.c *.cpp *.ipp *.inl *.h *.hpp *.doxy

# The RECURSIVE tag can be used to turn specify whether or not subdirectories
# should be searched for input files as well. Possible values are YES and NO.
# If left blank NO is used.

RECURSIVE = YES
RECURSIVE = NO

# The EXCLUDE tag can be used to specify files and/or directories that should
# excluded from the INPUT source files. This way you can easily exclude a
@@ -523,7 +522,7 @@ EXAMPLE_PATTERNS =
# commands irrespective of the value of the RECURSIVE tag.
# Possible values are YES and NO. If left blank NO is used.

EXAMPLE_RECURSIVE = NO
EXAMPLE_RECURSIVE = YES

# The IMAGE_PATH tag can be used to specify one or more files or
# directories that contain image that are included in the documentation (see
@@ -1027,7 +1026,8 @@ PREDEFINED = CPPCMS_DOXYGEN_DOCS \
BOOSTER_DOXYGEN_DOCS \
BOOST_LOCALE_DECL= \
CPPCMS_DEPRECATED= \
CPPCMS_API=
CPPCMS_API= \
BOOSTER_API=

# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.


+ 7
- 7
booster/booster/aio/aio_category.h View File

@@ -19,13 +19,13 @@ namespace aio {
///
namespace aio_error {
enum {
ok, //< No error
canceled, //< Operation was canceled
select_failed, //< It was impossible to perform select operation on the file descriptor
eof, //< End of file occured
invalid_endpoint, //< The provided endpoint (address) is not valid
no_service_provided, //< The io_service was not assigned
prefork_not_enabled //< Prefork acceptor support is not enabled
ok, ///< No error
canceled, ///< Operation was canceled
select_failed, ///< It was impossible to perform select operation on the file descriptor
eof, ///< End of file occured
invalid_endpoint, ///< The provided endpoint (address) is not valid
no_service_provided, ///< The io_service was not assigned
prefork_not_enabled ///< Prefork acceptor support is not enabled
};

///


+ 1
- 1
booster/booster/aio/stream_socket.h View File

@@ -25,7 +25,7 @@ namespace aio {
///
/// \breif This object represents a stream socket: TCP/IP IPv4 or IPv6 or Unix domain
/// \brief This object represents a stream socket: TCP/IP IPv4 or IPv6 or Unix domain
/// stream socket
///
class BOOSTER_API stream_socket : public basic_socket {


+ 4
- 2
booster/booster/backtrace.h View File

@@ -243,7 +243,6 @@ namespace booster {
};

/// \cond INTERNAL

namespace details {
class trace_manip {
public:
@@ -266,19 +265,22 @@ namespace booster {
return t.write(out);
}
}

/// \endcond

///
/// \brief manipulator that print stack trace for the exception \a e if it is derived from backtrace.
///
/// For example:
///
/// \code
///
/// catch(std::exception const &e) {
/// std::cerr << e.what() << std::endl;
/// std::cerr << booster::trace(e);
/// }
///
/// \endcode
///
template<typename E>
details::trace_manip trace(E const &e)
{


+ 2
- 2
booster/booster/locale/boundary/index.h View File

@@ -1099,9 +1099,9 @@ namespace booster {
} // boost

///
/// \example boundary.cpp
/// boundary.cpp
/// Example of using segment_index
/// \example wboundary.cpp
/// wboundary.cpp
/// Example of using segment_index over wide strings
///



+ 1
- 1
booster/booster/locale/collator.h View File

@@ -255,7 +255,7 @@ namespace locale {

#endif
///
/// \example collate.cpp
/// collate.cpp
/// Example of using collation functions
///
// vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4

+ 2
- 2
booster/booster/locale/conversion.h View File

@@ -367,11 +367,11 @@ namespace booster {
#endif

///
/// \example conversions.cpp
/// conversions.cpp
///
/// Example of using various text conversion functions.
///
/// \example wconversions.cpp
/// wconversions.cpp
///
/// Example of using various text conversion functions with wide strings.
///


+ 1
- 1
booster/booster/locale/date_time.h View File

@@ -1142,7 +1142,7 @@ namespace booster {

#endif
///
/// \example calendar.cpp
/// calendar.cpp
///
/// Example of using date_time functions for generating calendar for current year.
///


+ 2
- 2
booster/booster/locale/format.h View File

@@ -501,11 +501,11 @@ namespace booster {
#endif

///
/// \example hello.cpp
/// hello.cpp
///
/// Basic example of using various functions provided by this library
///
/// \example whello.cpp
/// whello.cpp
///
/// Basic example of using various functions with wide strings provided by this library
///


+ 5
- 3
booster/booster/log.h View File

@@ -233,7 +233,7 @@ namespace log {
BOOSTER_API std::string format_plain_text_message(message const &msg);

///
/// stderr based sink - sends messages to standard error output
/// \brief stderr based sink - sends messages to standard error output
///
class BOOSTER_API standard_error : public sink {
public:
@@ -246,7 +246,7 @@ namespace log {
};
///
/// stderr based sink - sends messages to log file
/// \brief log file based sink - sends messages to log file
///
class BOOSTER_API file : public sink {
public:
@@ -291,7 +291,9 @@ namespace log {

#ifdef BOOSTER_POSIX
///
/// POSIX syslog sink.
/// \brief POSIX syslog sink
///
/// Avalible only on POSIX platforms
///
class BOOSTER_API syslog : public sink {
public:


+ 3
- 1
booster/booster/nowide/fstream.h View File

@@ -53,7 +53,9 @@ namespace nowide {
};

#else // not msvc
/// \cont INTERNAL

/// \cond INTERNAL

namespace details {
class stdio_iodev : public booster::io_device {
stdio_iodev(stdio_iodev const &);


+ 1
- 1
booster/booster/regex_match.h View File

@@ -103,7 +103,7 @@ namespace booster {


///
/// The object that hold the result of matching a regular expression against the text
/// \brief The object that hold the result of matching a regular expression against the text
/// using regex_match and regex_search functions
///
template<typename Iterator>


+ 0
- 2
booster/booster/shared_object.h View File

@@ -34,8 +34,6 @@ namespace booster {
/// Create shared object and load it, \see open(std::string const&,bool);
///
/// \param file_name - the name of the file, UTF-8 encoded under Windows
/// \param reloadable - under windows copies the DLL allowing it to be overwritten
/// in the run-time, ignored on all other platforms
///
/// \throws booster::system::system_error if it is impossible to load it
///


+ 1
- 1
cppcms/crypto.h View File

@@ -166,7 +166,7 @@ namespace cppcms {
};
///
/// This object calculates the HMAC signature for the input data
/// \brief This object calculates the HMAC signature for the input data
///
class CPPCMS_API hmac : public booster::noncopyable {
public:


+ 2
- 0
cppcms/filters.h View File

@@ -36,6 +36,8 @@ namespace cppcms {
namespace filters {

///
/// \brief A special proxy object for writing any object to a std::ostream
///
/// This is special object that is used to store a reference to any other object
/// that can be written to std::ostream, giving as easy way to write a filter for
/// any object that can be written to stream


+ 9
- 9
cppcms/form.h View File

@@ -797,7 +797,7 @@ namespace cppcms {
};

///
/// This class represents a basic widget that generates HTML form elements
/// \brief This class represents a basic widget that generates HTML form elements
/// the widgets that use the <input \/> HTML tag.
///
/// It allows you to create your own widgets more easily. It does most of job required to
@@ -875,7 +875,7 @@ namespace cppcms {
};

///
/// This widget represents a hidden input form element. It is used to provide
/// \brief This widget represents a hidden input form element. It is used to provide
/// information invisible to the user.
///
/// I has the same properties as a text widget has but it does not render any HTML
@@ -902,7 +902,7 @@ namespace cppcms {


///
/// This text widget behaves similarly to the text widget but uses
/// \brief This text widget behaves similarly to the text widget but uses
/// the \c textarea HTML tag rather than the \c input HTML tag.
///
class CPPCMS_API textarea : public base_text
@@ -1179,7 +1179,7 @@ namespace cppcms {
};

///
/// This class represent an HTML checkbox input element.
/// \brief This class represent an HTML checkbox input element.
///
class CPPCMS_API checkbox: public base_html_input {
public:
@@ -1228,7 +1228,7 @@ namespace cppcms {
};
///
/// This widget represents an HTML multiple select form element.
/// \brief This widget represents an HTML multiple select form element.
///
class CPPCMS_API select_multiple : public base_widget {
public:
@@ -1337,7 +1337,7 @@ namespace cppcms {
};

///
/// This is the base class for "select" like widgets which include dropdown lists
/// \brief This is the base class for "select" like widgets which include dropdown lists
/// and radio button sets.
///
class CPPCMS_API select_base : public base_widget {
@@ -1433,7 +1433,7 @@ namespace cppcms {
};

///
/// The widget that uses a drop-down list for selection.
/// \brief The widget that uses a drop-down list for selection.
///
class CPPCMS_API select : public select_base {
public:
@@ -1447,7 +1447,7 @@ namespace cppcms {
};

///
/// The widget that uses a set of radio buttons..
/// \brief The widget that uses a set of radio buttons..
///
class CPPCMS_API radio : public select_base {
public:
@@ -1580,7 +1580,7 @@ namespace cppcms {


///
/// Submit button widget.
/// \brief Submit button widget.
///
class CPPCMS_API submit : public base_html_input {
public:


+ 9
- 7
cppcms/json.h View File

@@ -41,11 +41,11 @@ namespace json {
class value;

///
/// Special object that is convertible to null json value
/// \brief Special object that is convertible to null json value
///
struct null {};
///
/// Special object that is convertible to undefined json value
/// \brief Special object that is convertible to undefined json value
///
struct undefined {};

@@ -55,18 +55,18 @@ namespace json {
inline bool operator!=(null const &/*l*/,null const &/*r*/) {return false;}

///
/// The json::array - std::vector of json::value's
/// \brief The json::array - std::vector of json::value's
///
typedef std::vector<value> array;
///
/// The json::object - std::map of json::value's
/// \brief The json::object - std::map of json::value's
///
typedef std::map<string_key,value> object;

#ifdef CPPCMS_DOXYGEN_DOCS

///
/// The type traits schema for converting json values to/from orinary objects
/// \brief The type traits schema for converting json values to/from orinary objects
/// i.e. serialization from JSON to C++ object
///
template<typename T>
@@ -145,8 +145,10 @@ namespace json {
std::ostream CPPCMS_API &operator<<(std::ostream &out,json_type);

///
/// This class is central representation of json objects. It can be a value from any type
/// including object, array and undefined
/// \brief This class is central representation of json objects.
///
/// It can be a value from any type
/// including scalar, object, array and undefined
///
class CPPCMS_API value {
public:


+ 4
- 2
cppcms/mount_point.h View File

@@ -26,8 +26,10 @@

namespace cppcms {
///
/// This class represents application's mount point or the rule on which specific application
/// is selected to process the query. It is used by applications_pool class for mounting applications,
/// \brief This class represents application's mount point or the rule on which specific application
/// is selected to process the query.
///
/// It is used by applications_pool class for mounting applications,
/// and by forwarding managers to match forwarding requests
///
class CPPCMS_API mount_point {


+ 14
- 3
cppcms/rpc_json.h View File

@@ -25,10 +25,13 @@
#include <cppcms/cppcms_error.h>

namespace cppcms {
///
/// \brief This namespace holds API for implementing various RPC APIs, like JsonRPC
///
namespace rpc {

///
/// The error thrown in case of bad call - parameters mismatch or
/// \brief The error thrown in case of bad call - parameters mismatch or
/// invalid request.
///
/// User should may throw it case of a error as invalid request inside the
@@ -45,7 +48,9 @@ namespace rpc {
class json_rpc_server;

///
/// This class represents single call of json-rpc method. It is used
/// \brief This class represents single call of json-rpc method.
///
/// It is used
/// for handling asynchronous responses only. Similar API is provided
/// in json_rpc_server class for synchronous methods.
///
@@ -112,7 +117,10 @@ namespace rpc {
};

///
/// JSON-RPC service provider
/// \brief JSON-RPC service application.
///
/// User is expected to derive his own objects from this class in order to implement Json-RPC calls
/// similarly to how cppcms::application is used.
///
class CPPCMS_API json_rpc_server : public application {
public:
@@ -204,6 +212,7 @@ namespace rpc {
booster::hold_ptr<_data> d;
};

/// \cond INTERNAL

namespace details {

@@ -352,6 +361,8 @@ namespace rpc {

#undef CPPCMS_JSON_RPC_BINDER

/// \endcond

} // rpc
} // cppcms



+ 16
- 8
cppcms/serialization_classes.h View File

@@ -31,7 +31,7 @@ namespace cppcms {

#ifdef CPPCMS_DOXYGEN_DOCS
///
/// Special traits class that describes how to serialize various
/// \brief Special traits class that describes how to serialize various
/// objects that are not defived from serializable_base.
///
template<typename Object>
@@ -55,7 +55,7 @@ namespace cppcms {


///
/// Error thrown in case of serialization error
/// \brief Error thrown in case of serialization error
///
class archive_error : public booster::runtime_error {
public:
@@ -66,7 +66,7 @@ namespace cppcms {


///
/// Class that represents a binary archive that can be stored in persistent storage or
/// \brief Class that represents a binary archive that can be stored in persistent storage or
/// transfered.
///
class CPPCMS_API archive {
@@ -167,7 +167,7 @@ namespace cppcms {
};

///
/// Opererator that performs load or store \a object operations
/// Operator that performs load or store \a object operations
/// on archive \a
///
template<typename Archivable>
@@ -180,6 +180,9 @@ namespace cppcms {
return a;
}

///
/// Operator that saves an object to the archive
///
template<typename Archivable>
archive & operator <<(archive &a,Archivable const &object)
{
@@ -187,6 +190,9 @@ namespace cppcms {
return a;
}

///
/// Operator that loads an object from the archive
///
template<typename Archivable>
archive & operator >>(archive &a,Archivable &object)
{
@@ -198,7 +204,7 @@ namespace cppcms {
///
/// Base abstract class for object that can be serialized into std::string
/// \brief Base abstract class for object that can be serialized into std::string
///
class serializable_base {
public:
@@ -217,7 +223,7 @@ namespace cppcms {
};

///
/// Abstract class for serialization object
/// \brief Abstract class for serialization object
///
class serializable : public serializable_base {
public:
@@ -264,7 +270,9 @@ namespace cppcms {
#ifdef CPPCMS_DOXYGEN_DOCS
///
/// This is the traits class for serialization traits. It allows user to use
/// \brief This is the traits class for serialization traits.
///
/// It allows user to use
/// arbitrary serialization libraries or use its own serialization rules,
/// for example you can use boost::serialization.
///
@@ -314,7 +322,7 @@ namespace cppcms {
struct serialization_traits;

///
/// Traits for serializable objects - converts object to and from string
/// \brief Traits for serializable objects - converts object to and from string
/// using archive class
///
template<typename D>


+ 1
- 1
cppcms/session_cookies.h View File

@@ -80,7 +80,7 @@ namespace sessions {
};

///
/// The implementation of session_api using encrypted or signed cookies
/// \brief The implementation of session_api using encrypted or signed cookies
///
class CPPCMS_API session_cookies : public session_api {
public:


+ 1
- 1
cppcms/session_storage.h View File

@@ -31,7 +31,7 @@ namespace json {
namespace sessions {

///
/// \a session_server_storage is an abstract class that allows user to implements
/// \brief session_server_storage is an abstract class that allows user to implements
/// custom session storage device like, database storage device
///
/// Note: if the member functions save/load/remove are thread safe -- can be called


+ 3
- 1
cppcms/steal_buf.h View File

@@ -184,9 +184,11 @@ namespace util {
};

///
/// \brief Fast output stream object.
///
/// This is a special ostream that uses stack in order
/// to receive the data and faster then std::stringstream for
/// small chunks.
/// small chunks, also it is not limited for any particular size.
///
template<size_t Size = 128>
class stackstream : public std::ostream {


+ 1
- 1
cppcms/url_mapper.h View File

@@ -352,7 +352,7 @@ namespace cppcms {
filters::streamable const &p6);

///
/// Mount sub application \a app using name \a name to a \url.
/// Mount sub application \a app using name \a name to \a url.
///
/// The URL format as in assign but it requires a single parameter {1}
/// which would be substituted with the mapping of the URL of sub-application


+ 1
- 3
cppcms/views_pool.h View File

@@ -38,7 +38,7 @@ namespace cppcms {
namespace views {

///
/// The class that represents a single skin and generates its views.
/// \brief The class that represents a single skin and generates its views.
///
/// Usually used by templates compiler
///
@@ -160,8 +160,6 @@ namespace cppcms {
/// Get the singleton instance of the views pool
///
static pool &instance();

/// \endcond
private:
pool();


doc/doc.h → doc/mainpage.doxy View File

@@ -2,6 +2,8 @@

\mainpage CppCMS - C++ Web Development Framework

\section mainpage_intro Introduction

What is CppCMS? CppCMS is Free C++ Web Development Framework (not CMS) aimed for
Rapid Web Application Development. It differs from most of other web development
frameworks like: Python Django, Java Servlets or C++ Wt in following:
@@ -10,6 +12,7 @@ frameworks like: Python Django, Java Servlets or C++ Wt in following:
-# It uses modern C++ as primary development language in order to achieve first goal.
-# It is aimed on development of Web Sites rather then "GUI Like" web applications.

\section mainpage_docs Documentation

This is reference documentation for CppCMS. It includes two major parts:

@@ -25,7 +28,8 @@ Or

- http://cppcms.sourceforge.net/

For examples see \subpage examples_page
\section mainpage_examples Examples

Multiple examples of using CppCMS can be found at this page \subpage examples_page

*/

+ 322
- 0
examples/autogenerated.doxy View File

@@ -0,0 +1,322 @@

/*! \page ex_basic_cache Using CppCMS Cache

- \subpage ex_basic_cache____config__js
- \subpage ex_basic_cache____content__h
- \subpage ex_basic_cache____hello__cpp
- \subpage ex_basic_cache____Makefile
- \subpage ex_basic_cache____view__tmpl

\page ex_basic_cache____config__js basic_cache/config.js Configuration File
\include basic_cache/config.js
\page ex_basic_cache____content__h basic_cache/content.h Header File
\include basic_cache/content.h
\page ex_basic_cache____hello__cpp basic_cache/hello.cpp Source File
\include basic_cache/hello.cpp
\page ex_basic_cache____Makefile basic_cache/Makefile Makefile
\include basic_cache/Makefile
\page ex_basic_cache____view__tmpl basic_cache/view.tmpl Template File
\include basic_cache/view.tmpl
*/

/*! \page ex_chat Basic Comet Example

- \subpage ex_chat____chat__cpp
- \subpage ex_chat____config__js
- \subpage ex_chat____Makefile
- \subpage ex_chat____the_chat__html

\page ex_chat____chat__cpp chat/chat.cpp Source File
\include chat/chat.cpp
\page ex_chat____config__js chat/config.js Configuration File
\include chat/config.js
\page ex_chat____Makefile chat/Makefile Makefile
\include chat/Makefile
\page ex_chat____the_chat__html chat/the_chat.html Header File
\include chat/the_chat.html
*/

/*! \page ex_forms Using CppCMS forms

- \subpage ex_forms____config__js
- \subpage ex_forms____content__h
- \subpage ex_forms____hello__cpp
- \subpage ex_forms____Makefile
- \subpage ex_forms____view__tmpl

\page ex_forms____config__js forms/config.js Configuration File
\include forms/config.js
\page ex_forms____content__h forms/content.h Header File
\include forms/content.h
\page ex_forms____hello__cpp forms/hello.cpp Source File
\include forms/hello.cpp
\page ex_forms____Makefile forms/Makefile Makefile
\include forms/Makefile
\page ex_forms____view__tmpl forms/view.tmpl Template File
\include forms/view.tmpl
*/

/*! \page ex_hello_world Our First 'Hello World' Program

- \subpage ex_hello_world____config__js
- \subpage ex_hello_world____hello__cpp
- \subpage ex_hello_world____Makefile

\page ex_hello_world____config__js hello_world/config.js Configuration File
\include hello_world/config.js
\page ex_hello_world____hello__cpp hello_world/hello.cpp Source File
\include hello_world/hello.cpp
\page ex_hello_world____Makefile hello_world/Makefile Makefile
\include hello_world/Makefile
*/

/*! \page ex_json Using JSON API

- \subpage ex_json____json__cpp
- \subpage ex_json____Makefile

\page ex_json____json__cpp json/json.cpp Source File
\include json/json.cpp
\page ex_json____Makefile json/Makefile Makefile
\include json/Makefile
*/

/*! \page ex_json_rpc Simple JsonRPC example

- \subpage ex_json_rpc____config__js
- \subpage ex_json_rpc____index__html
- \subpage ex_json_rpc____Makefile
- \subpage ex_json_rpc____rpc__cpp
- \subpage ex_json_rpc____usingrpc__html

\page ex_json_rpc____config__js json_rpc/config.js Configuration File
\include json_rpc/config.js
\page ex_json_rpc____index__html json_rpc/index.html JsonRPC Client Using XMLHttpRequest
\include json_rpc/index.html
\page ex_json_rpc____Makefile json_rpc/Makefile Makefile
\include json_rpc/Makefile
\page ex_json_rpc____rpc__cpp json_rpc/rpc.cpp Source File
\include json_rpc/rpc.cpp
\page ex_json_rpc____usingrpc__html json_rpc/usingrpc.html Using JsonRPC Object
\include json_rpc/usingrpc.html
*/

/*! \page ex_json_rpc_chat Implementing chat using asynchronous JSON RPC calls

- \subpage ex_json_rpc_chat____chat__cpp
- \subpage ex_json_rpc_chat____config__js
- \subpage ex_json_rpc_chat____index__html
- \subpage ex_json_rpc_chat____Makefile

\page ex_json_rpc_chat____chat__cpp json_rpc_chat/chat.cpp Source File
\include json_rpc_chat/chat.cpp
\page ex_json_rpc_chat____config__js json_rpc_chat/config.js Configuration File
\include json_rpc_chat/config.js
\page ex_json_rpc_chat____index__html json_rpc_chat/index.html Header File
\include json_rpc_chat/index.html
\page ex_json_rpc_chat____Makefile json_rpc_chat/Makefile Makefile
\include json_rpc_chat/Makefile
*/

/*! \page ex_localization Localizing CppCMS Applications

- \subpage ex_localization____config__js
- \subpage ex_localization____content__h
- \subpage ex_localization____hello__cpp
- \subpage ex_localization____locale_he_LC_MESSAGES_hello__po
- \subpage ex_localization____Makefile
- \subpage ex_localization____view__tmpl

\page ex_localization____config__js localization/config.js Configuration File
\include localization/config.js
\page ex_localization____content__h localization/content.h Header File
\include localization/content.h
\page ex_localization____hello__cpp localization/hello.cpp Source File
\include localization/hello.cpp
\page ex_localization____locale_he_LC_MESSAGES_hello__po localization/locale/he/LC_MESSAGES/hello.po Gettext Dictionary File
\include localization/locale/he/LC_MESSAGES/hello.po
\page ex_localization____Makefile localization/Makefile Makefile
\include localization/Makefile
\page ex_localization____view__tmpl localization/view.tmpl Template File
\include localization/view.tmpl
*/

/*! \page ex_message_board Full Message Board Application Example using Cache, Sessions, CppDB library and more

- \subpage ex_message_board____apps_forums__cpp
- \subpage ex_message_board____apps_forums__h
- \subpage ex_message_board____apps_main__cpp
- \subpage ex_message_board____apps_master__cpp
- \subpage ex_message_board____apps_master__h
- \subpage ex_message_board____apps_mb__cpp
- \subpage ex_message_board____apps_mb__h
- \subpage ex_message_board____apps_thread__cpp
- \subpage ex_message_board____apps_thread__h
- \subpage ex_message_board____CMakeLists__txt
- \subpage ex_message_board____config__js
- \subpage ex_message_board____data_data__h
- \subpage ex_message_board____data_forums__h
- \subpage ex_message_board____data_master__h
- \subpage ex_message_board____data_thread__h
- \subpage ex_message_board____locale_he_LC_MESSAGES_mb__po
- \subpage ex_message_board____media_style-ltr__css
- \subpage ex_message_board____media_style-rtl__css
- \subpage ex_message_board____media_style__css
- \subpage ex_message_board____model_mysql__sql
- \subpage ex_message_board____model_sqlite3__sql
- \subpage ex_message_board____view_forums__tmpl
- \subpage ex_message_board____view_master__tmpl
- \subpage ex_message_board____view_thread__tmpl

\page ex_message_board____apps_forums__cpp message_board/apps/forums.cpp Source File
\include message_board/apps/forums.cpp
\page ex_message_board____apps_forums__h message_board/apps/forums.h Header File
\include message_board/apps/forums.h
\page ex_message_board____apps_main__cpp message_board/apps/main.cpp Source File
\include message_board/apps/main.cpp
\page ex_message_board____apps_master__cpp message_board/apps/master.cpp Source File
\include message_board/apps/master.cpp
\page ex_message_board____apps_master__h message_board/apps/master.h Header File
\include message_board/apps/master.h
\page ex_message_board____apps_mb__cpp message_board/apps/mb.cpp Source File
\include message_board/apps/mb.cpp
\page ex_message_board____apps_mb__h message_board/apps/mb.h Header File
\include message_board/apps/mb.h
\page ex_message_board____apps_thread__cpp message_board/apps/thread.cpp Source File
\include message_board/apps/thread.cpp
\page ex_message_board____apps_thread__h message_board/apps/thread.h Header File
\include message_board/apps/thread.h
\page ex_message_board____CMakeLists__txt message_board/CMakeLists.txt CMake Build Script
\include message_board/CMakeLists.txt
\page ex_message_board____config__js message_board/config.js Configuration File
\include message_board/config.js
\page ex_message_board____data_data__h message_board/data/data.h Header File
\include message_board/data/data.h
\page ex_message_board____data_forums__h message_board/data/forums.h Header File
\include message_board/data/forums.h
\page ex_message_board____data_master__h message_board/data/master.h Header File
\include message_board/data/master.h
\page ex_message_board____data_thread__h message_board/data/thread.h Header File
\include message_board/data/thread.h
\page ex_message_board____locale_he_LC_MESSAGES_mb__po message_board/locale/he/LC_MESSAGES/mb.po Gettext Dictionary File
\include message_board/locale/he/LC_MESSAGES/mb.po
\page ex_message_board____media_style-ltr__css message_board/media/style-ltr.css CSS Media File
\include message_board/media/style-ltr.css
\page ex_message_board____media_style-rtl__css message_board/media/style-rtl.css CSS Media File
\include message_board/media/style-rtl.css
\page ex_message_board____media_style__css message_board/media/style.css CSS Media File
\include message_board/media/style.css
\page ex_message_board____model_mysql__sql message_board/model/mysql.sql SQL Script File
\include message_board/model/mysql.sql
\page ex_message_board____model_sqlite3__sql message_board/model/sqlite3.sql SQL Script File
\include message_board/model/sqlite3.sql
\page ex_message_board____view_forums__tmpl message_board/view/forums.tmpl Template File
\include message_board/view/forums.tmpl
\page ex_message_board____view_master__tmpl message_board/view/master.tmpl Template File
\include message_board/view/master.tmpl
\page ex_message_board____view_thread__tmpl message_board/view/thread.tmpl Template File
\include message_board/view/thread.tmpl
*/

/*! \page ex_sessions Using Sessions

- \subpage ex_sessions____config__js
- \subpage ex_sessions____content__h
- \subpage ex_sessions____hello__cpp
- \subpage ex_sessions____Makefile
- \subpage ex_sessions____view__tmpl

\page ex_sessions____config__js sessions/config.js Configuration File
\include sessions/config.js
\page ex_sessions____content__h sessions/content.h Header File
\include sessions/content.h
\page ex_sessions____hello__cpp sessions/hello.cpp Source File
\include sessions/hello.cpp
\page ex_sessions____Makefile sessions/Makefile Makefile
\include sessions/Makefile
\page ex_sessions____view__tmpl sessions/view.tmpl Template File
\include sessions/view.tmpl
*/

/*! \page ex_templates Using CppCMS template system

- \subpage ex_templates____config-dyn__js
- \subpage ex_templates____config__js
- \subpage ex_templates____content__h
- \subpage ex_templates____first__tmpl
- \subpage ex_templates____hello-tmpl__cpp
- \subpage ex_templates____Makefile
- \subpage ex_templates____Makefile__dyn

\page ex_templates____config-dyn__js templates/config-dyn.js Configuration File for dynamic templates loading
\include templates/config-dyn.js
\page ex_templates____config__js templates/config.js Configuration File for static templates linking
\include templates/config.js
\page ex_templates____content__h templates/content.h Header File
\include templates/content.h
\page ex_templates____first__tmpl templates/first.tmpl Template File
\include templates/first.tmpl
\page ex_templates____hello-tmpl__cpp templates/hello-tmpl.cpp Source File
\include templates/hello-tmpl.cpp
\page ex_templates____Makefile templates/Makefile Makefile for static templates linking
\include templates/Makefile
\page ex_templates____Makefile__dyn templates/Makefile.dyn Makefile for dynamic templates loading
\include templates/Makefile.dyn
*/

/*! \page ex_uploads Uploading files with CppCMS

- \subpage ex_uploads____config__js
- \subpage ex_uploads____content__h
- \subpage ex_uploads____index__html
- \subpage ex_uploads____Makefile
- \subpage ex_uploads____uploader__cpp
- \subpage ex_uploads____view__tmpl

\page ex_uploads____config__js uploads/config.js Configuration File
\include uploads/config.js
\page ex_uploads____content__h uploads/content.h Header File
\include uploads/content.h
\page ex_uploads____index__html uploads/index.html Header File
\include uploads/index.html
\page ex_uploads____Makefile uploads/Makefile Makefile
\include uploads/Makefile
\page ex_uploads____uploader__cpp uploads/uploader.cpp Source File
\include uploads/uploader.cpp
\page ex_uploads____view__tmpl uploads/view.tmpl Template File
\include uploads/view.tmpl
*/

/*! \page ex_url_mapping Using nice URLs and a mapping between modules and URLs

- \subpage ex_url_mapping____config__js
- \subpage ex_url_mapping____hello__cpp
- \subpage ex_url_mapping____Makefile

\page ex_url_mapping____config__js url_mapping/config.js Configuration File
\include url_mapping/config.js
\page ex_url_mapping____hello__cpp url_mapping/hello.cpp Source File
\include url_mapping/hello.cpp
\page ex_url_mapping____Makefile url_mapping/Makefile Makefile
\include url_mapping/Makefile
*/

/*! \page ex_xss XSS filters and their use example

- \subpage ex_xss____comment_profile__js
- \subpage ex_xss____config__js
- \subpage ex_xss____Makefile
- \subpage ex_xss____tinymce_profile__js
- \subpage ex_xss____xss__cpp

\page ex_xss____comment_profile__js xss/comment_profile.js Configuration File
\include xss/comment_profile.js
\page ex_xss____config__js xss/config.js Configuration File
\include xss/config.js
\page ex_xss____Makefile xss/Makefile Makefile
\include xss/Makefile
\page ex_xss____tinymce_profile__js xss/tinymce_profile.js Configuration File
\include xss/tinymce_profile.js
\page ex_xss____xss__cpp xss/xss.cpp Source File
\include xss/xss.cpp
*/

+ 0
- 23
examples/basic_cache/basic_cache.doxy View File

@@ -1,23 +0,0 @@
/*!

\page ex_basic_cache Basic Caching


C++ Sources:


\include basic_cache/hello.cpp

Content Header:

\include basic_cache/content.h

HTML Template

\include basic_cache/view.tmpl

Configuration File

\include basic_cache/config.js

*/

+ 0
- 15
examples/chat/chat.doxy View File

@@ -1,15 +0,0 @@
/*! \page ex_chat Simple Chat

C++ Source Code:

\include chat/chat.cpp

HTML Client

\include chat/the_chat.html

Confuiguration File:

\include chat/config.js

*/

+ 20
- 0
examples/examples.txt View File

@@ -0,0 +1,20 @@
basic_cache Using CppCMS Cache
chat Basic Comet Example
forms Using CppCMS forms
hello_world Our First 'Hello World' Program
json Using JSON API
json_rpc Simple JsonRPC example
json_rpc/index.html JsonRPC Client Using XMLHttpRequest
json_rpc/usingrpc.html Using JsonRPC Object
json_rpc_chat Implementing chat using asynchronous JSON RPC calls
localization Localizing CppCMS Applications
message_board Full Message Board Application Example using Cache, Sessions, CppDB library and more
sessions Using Sessions
templates Using CppCMS template system
templates/Makefile Makefile for static templates linking
templates/Makefile.dyn Makefile for dynamic templates loading
templates/config.js Configuration File for static templates linking
templates/config-dyn.js Configuration File for dynamic templates loading
uploads Uploading files with CppCMS
url_mapping Using nice URLs and a mapping between modules and URLs
xss XSS filters and their use example

+ 70
- 0
examples/format.sh View File

@@ -0,0 +1,70 @@
rm autogenerated.doxy
for f in *
do
echo $f
if ! [ -d $f ]
then
continue
fi
echo "entering $f"
EXAMPLE_DESCRIPTION=`grep -E "^$f " examples.txt`
if [ "$EXAMPLE_DESCRIPTION" == "" ]
then
EXAMPLE_DESCRIPTION=$f
else
EXAMPLE_DESCRIPTION=${EXAMPLE_DESCRIPTION#$f }
fi
echo $EXAMPLE_DESCRIPTION
echo >> autogenerated.doxy
echo '/*! \page ' ex_$f $EXAMPLE_DESCRIPTION >>autogenerated.doxy
echo >>autogenerated.doxy
cd $f
find . \
-iname '*.cpp' \
-o -iname '*.tmpl' \
-o -iname 'Makefile*' \
-o -iname 'CMake*' \
-o -iname '*.h' \
-o -iname '*.po' \
-o -iname '*.js' \
-o -iname '*.css' \
-o -iname '*.sql' \
-o -iname '*.html' \
| grep -v svn >../tmp.txt
cd ..
for n in `cat tmp.txt`
do
FILE=${n//./_/}
FILE=${FILE//\//_}
echo "- \subpage ex_${f}_$FILE" >> autogenerated.doxy
done
echo >> autogenerated.doxy
for n in `cat tmp.txt`
do
FILE=${n//./_/}
FILE=${FILE//\//_}
FILE_PATH=$f${n/.\///}
DESCRIPTION=`grep -E "^$FILE_PATH " examples.txt`
if [ "$DESCRIPTION" == "" ]
then
case $n in
*.cpp* ) DESCRIPTION="Source File" ;;
*.h* ) DESCRIPTION="Header File" ;;
*.tmpl ) DESCRIPTION="Template File" ;;
*.html ) DESCRIPTION="HTML File" ;;
*.js ) DESCRIPTION="Configuration File" ;;
*.po ) DESCRIPTION="Gettext Dictionary File" ;;
*.css ) DESCRIPTION="CSS Media File" ;;
*.sql ) DESCRIPTION="SQL Script File" ;;
*CMakeLists* ) DESCRIPTION="CMake Build Script" ;;
*Makefile* ) DESCRIPTION="Makefile" ;;
esac
DESCRIPTION="$FILE_PATH $DESCRIPTION"
fi
echo $FILE_PATH
echo "\page ex_${f}_$FILE $DESCRIPTION" >> autogenerated.doxy
echo "\include $FILE_PATH" >> autogenerated.doxy
done
echo '*/' >> autogenerated.doxy
rm tmp.txt
done

+ 0
- 15
examples/forms/forms.doxy View File

@@ -1,15 +0,0 @@
/*! \page ex_forms Using CppCMS Forms

Content

\include forms/content.h

Sources

\include forms/hello.cpp

Template

\include forms/view.tmpl

*/

+ 0
- 22
examples/hello_world/hello_world.doxy View File

@@ -1,22 +0,0 @@
/*! \page ex_hello_world Hello World

C++ Source:

\include hello_world/hello.cpp

Makefile:

\include hello_world/Makefile

Configuration File:

\include hello_world/config.js

Running:

\code
./hello -c config.js
\endcode


*/

+ 0
- 5
examples/json/json.doxy View File

@@ -1,5 +0,0 @@
/*! \page ex_json Using JSON example

\include json/json.cpp

*/

+ 0
- 19
examples/json_rpc/json_rpc.doxy View File

@@ -1,19 +0,0 @@
/*! \page ex_json_rpc Json RPC API Example

C++ Source:

\include json_rpc/rpc.cpp

JSON RPC Client Code using XMLHttpRequest:

\include json_rpc/index.html

JSON RPC Client using CppCMS's jsonrpc library

\include json_rpc/usingrpc.html

Configuration File:

\include json_rpc/config.js

*/

+ 0
- 15
examples/json_rpc_chat/json_rpc_chat.doxy View File

@@ -1,15 +0,0 @@
/*! \page ex_json_rpc_chat Json RPC Chat Example - Comet with JSON

C++ Source:

\include json_rpc_chat/chat.cpp

HTML Client:

\include json_rpc_chat/index.html

Configuration File:

\include json_rpc_chat/config.js

*/

+ 3
- 2
tools/boost_to_booster View File

@@ -18,12 +18,12 @@ cp -a trunk boost_locale
#
# Linux version
#
find boost_locale -name '*.hpp' -exec rename 's/\.hpp/\.h/' '{}' \;
#find boost_locale -name '*.hpp' -exec rename 's/\.hpp/\.h/' '{}' \;
#

# Cygwin version
#
#find boost_locale -name '*.hpp' -exec rename .hpp .h '{}' \;
find boost_locale -name '*.hpp' -exec rename .hpp .h '{}' \;
#

find boost_locale -regextype posix-extended -regex '.*\.(cpp|h|ipp)' -exec sed -i 's/_HPP_INCLUDED/_H_INCLUDED/' '{}' \;
@@ -41,6 +41,7 @@ find boost_locale -regextype posix-extended -regex '.*\.(cpp|h|ipp)' -exec sed -
find boost_locale -regextype posix-extended -regex '.*\.(cpp|h|ipp)' -exec sed -i 's/std::out_of_range/booster::out_of_range/' '{}' \;
find boost_locale -regextype posix-extended -regex '.*\.(cpp|h|ipp)' -exec sed -i 's/std::invalid_argument/booster::invalid_argument/' '{}' \;
find boost_locale -regextype posix-extended -regex '.*\.(cpp|h|ipp)' -exec sed -i 's/#include <boost\/config\/auto_link.hpp>/#undef BOOST_LIB_NAME/' '{}' \;
find boost_locale -regextype posix-extended -regex '.*\.(cpp|h|ipp)' -exec sed -i 's/\\example //' '{}' \;

sed -i 's/BOOST_VERSION >= 103600/0/' boost_locale/libs/locale/src/shared/message.cpp



Loading…
Cancel
Save