Warning, file /include/boost/python/docstring_options.hpp was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005 #ifndef DOCSTRING_OPTIONS_RWGK20060111_HPP
0006 # define DOCSTRING_OPTIONS_RWGK20060111_HPP
0007
0008 #include <boost/python/object/function.hpp>
0009
0010 namespace boost { namespace python {
0011
0012
0013
0014 class BOOST_PYTHON_DECL docstring_options : boost::noncopyable
0015 {
0016 public:
0017 docstring_options(bool show_all=true)
0018 {
0019 previous_show_user_defined_ = show_user_defined_;
0020 previous_show_py_signatures_ = show_py_signatures_;
0021 previous_show_cpp_signatures_ = show_cpp_signatures_;
0022 show_user_defined_ = show_all;
0023 show_cpp_signatures_ = show_all;
0024 show_py_signatures_ = show_all;
0025 }
0026
0027 docstring_options(bool show_user_defined, bool show_signatures)
0028 {
0029 previous_show_user_defined_ = show_user_defined_;
0030 previous_show_cpp_signatures_ = show_cpp_signatures_;
0031 previous_show_py_signatures_ = show_py_signatures_;
0032 show_user_defined_ = show_user_defined;
0033 show_cpp_signatures_ = show_signatures;
0034 show_py_signatures_ = show_signatures;
0035 }
0036
0037 docstring_options(bool show_user_defined, bool show_py_signatures, bool show_cpp_signatures)
0038 {
0039 previous_show_user_defined_ = show_user_defined_;
0040 previous_show_cpp_signatures_ = show_cpp_signatures_;
0041 previous_show_py_signatures_ = show_py_signatures_;
0042 show_user_defined_ = show_user_defined;
0043 show_cpp_signatures_ = show_cpp_signatures;
0044 show_py_signatures_ = show_py_signatures;
0045 }
0046
0047 ~docstring_options()
0048 {
0049 show_user_defined_ = previous_show_user_defined_;
0050 show_cpp_signatures_ = previous_show_cpp_signatures_;
0051 show_py_signatures_ = previous_show_py_signatures_;
0052 }
0053
0054 void
0055 disable_user_defined() { show_user_defined_ = false; }
0056
0057 void
0058 enable_user_defined() { show_user_defined_ = true; }
0059
0060 void
0061 disable_py_signatures()
0062 {
0063 show_py_signatures_ = false;
0064 }
0065
0066 void
0067 enable_py_signatures()
0068 {
0069 show_py_signatures_ = true;
0070 }
0071
0072 void
0073 disable_cpp_signatures()
0074 {
0075 show_cpp_signatures_ = false;
0076 }
0077
0078 void
0079 enable_cpp_signatures()
0080 {
0081 show_cpp_signatures_ = true;
0082 }
0083
0084 void
0085 disable_signatures()
0086 {
0087 show_cpp_signatures_ = false;
0088 show_py_signatures_ = false;
0089 }
0090
0091 void
0092 enable_signatures()
0093 {
0094 show_cpp_signatures_ = true;
0095 show_py_signatures_ = true;
0096 }
0097
0098 void
0099 disable_all()
0100 {
0101 show_user_defined_ = false;
0102 show_cpp_signatures_ = false;
0103 show_py_signatures_ = false;
0104 }
0105
0106 void
0107 enable_all()
0108 {
0109 show_user_defined_ = true;
0110 show_cpp_signatures_ = true;
0111 show_py_signatures_ = true;
0112 }
0113
0114 friend struct objects::function;
0115
0116 private:
0117 static volatile bool show_user_defined_;
0118 static volatile bool show_cpp_signatures_;
0119 static volatile bool show_py_signatures_;
0120 bool previous_show_user_defined_;
0121 bool previous_show_cpp_signatures_;
0122 bool previous_show_py_signatures_;
0123 };
0124
0125 }}
0126
0127 #endif