From: Danny Siu <dsiu@adobe.com>
Subject: Re: func-menu
Date: Tue, 19 Jul 2005 18:03:28 -0700 [thread overview]
Message-ID: <u1x5ui90f.fsf@adobe.com> (raw)
In-Reply-To: <ubr4ypzvp.fsf@boost-consulting.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 351 bytes --]
David,
ECB does a nice job parsing Boost library headers plus it has an outline
view for the source file which making my code browsing much easier.
See my attached screen shot.
ECB can be obtained from:
http://ecb.sourceforge.net/
--
Danny Dick-Fung Siu mailto:dsiu@adobe.com
Advanced Technology Labs @ Adobe Systems Incorporated
[-- Attachment #2: ecb-boost.jpg --]
[-- Type: image/jpeg, Size: 126412 bytes --]
[-- Attachment #3: Type: text/plain, Size: 5364 bytes --]
David Abrahams writes:
David> "Ted Zlatanov" <tzz@lifelogs.com> writes:
>> On Tue, 19 Jul 2005, dave@boost-consulting.com wrote:
>>
>>> "Ted Zlatanov" <tzz@lifelogs.com> writes:
>>>
>>>> Have you tried which-func-mode in GNU Emacs?
>>>
>>> What does it do other than try to display the current function name?
>>
>> Nothing. I'm sorry for posting before my coffee :) I know and use
>> imenu, but somehow ended up writing about which-func-mode.
David> I don't know what imenu is either.
>> You can also look at the speedbar, which is nice (I've used it with
>> Java). I don't know if the code it uses to recognize functions is
>> different from imenu.
>>
>>> That particular feature is totally broken when it comes to C++.
>>
>> Really? Can you submit a bug to the Emacs team, if you have the time?
David> I really don't have time to do that for a thing you just asked me
David> to try and I had no other reason to use. However I'll give you a
David> file that contains one class with inline member functions, where
David> the only thing you ever see in the mode line is the class name.
David> Voilà.
David> // Copyright Daniel Wallin, David Abrahams 2005. Use, modification
David> // and distribution is subject to the Boost Software License,
David> // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
David> // http://www.boost.org/LICENSE_1_0.txt)
David> #ifndef KEYWORD_050328_HPP define KEYWORD_050328_HPP
David> #include <boost/parameter/aux_/unwrap_cv_reference.hpp> include
David> #<boost/parameter/aux_/tag.hpp> include
David> #<boost/parameter/aux_/default.hpp> include <boost/noncopyable.hpp>
David> namespace boost { namespace parameter {
David> // Instances of unique specializations of keyword<...> serve to
David> // associate arguments with parameter names. For example:
David> //
David> // struct rate_; // parameter names struct skew_; namespace {
David> // keyword<rate_> rate; // keywords keyword<skew_> skew;
David> // }
David> //
David> // ...
David> //
David> // f(rate = 1, skew = 2.4);
David> //
David> template <class Tag> struct keyword : noncopyable {
David> template <class T> typename aux::tag<Tag, T>::type operator=(T&
David> x) const {
David> typedef typename aux::tag<Tag, T>::type result; return
David> result(x);
David> }
David> template <class Default> aux::default_<Tag, Default>
David> operator|(Default& default_) const {
David> return aux::default_<Tag, Default>(default_);
David> }
David> template <class Default> aux::lazy_default<Tag, Default>
David> operator||(Default& default_) const {
David> return aux::lazy_default<Tag, Default>(default_);
David> }
David> #if !BOOST_WORKAROUND(BOOST_MSVC, <= 1200) // avoid partial
David> #ordering bugs
David> template <class T> typename aux::tag<Tag, T const>::type
David> operator=(T const& x) const {
David> typedef typename aux::tag<Tag, T const>::type result;
David> return result(x);
David> }
David> #endif
David> #if !BOOST_WORKAROUND(BOOST_MSVC, == 1200) // avoid partial
David> #ordering bugs
David> template <class Default> aux::default_<Tag, const Default>
David> operator|(const Default& default_) const
David> #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
David> volatile
David> #endif
David> {
David> return aux::default_<Tag, const Default>(default_);
David> }
David> template <class Default> aux::lazy_default<Tag, Default>
David> operator||(Default const& default_) const
David> #if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
David> volatile
David> #endif
David> {
David> return aux::lazy_default<Tag, Default>(default_);
David> }
David> #endif
David> public: // Insurance against ODR violations
David> // People will need to define these keywords in header files.
David> // To prevent ODR violations, it's important that the keyword
David> // used in every instantiation of a function template is the
David> // same object. We provide a reference to a common instance of
David> // each keyword object and prevent construction by users.
David> static keyword<Tag>& get() {
David> static keyword<Tag> result; return result;
David> }
David> private:
David> keyword() {}
David> };
David> // Reduces boilerplate required to declare and initialize keywords
David> // without violating ODR. Declares a keyword tag type with the
David> // given name in namespace tag_namespace, and declares and
David> // initializes a
David> //
David> #define BOOST_PARAMETER_KEYWORD(tag_namespace,name) \
David> namespace tag_namespace { struct name; } \
David> ::boost::parameter::keyword<tag_namespace::name>& name \ =
David> ::boost::parameter::keyword<tag_namespace::name>::get();
David> }} // namespace boost::parameter
David> #endif // KEYWORD_050328_HPP
David> -- Dave Abrahams Boost Consulting www.boost-consulting.com
--
Danny Siu
next prev parent reply other threads:[~2005-07-20 1:03 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-03 13:30 Asynchronous Gnus? David Abrahams
2005-06-03 20:37 ` Gnus with Exim (was: Asynchronous Gnus?) David Abrahams
2005-06-03 22:28 ` Gnus with Exim Steven E. Harris
2005-06-04 13:47 ` David Abrahams
2005-06-04 15:29 ` Steven E. Harris
2005-06-06 2:05 ` David Abrahams
2005-06-06 17:04 ` Steven E. Harris
2005-06-06 18:31 ` David Abrahams
2005-06-06 19:59 ` Steven E. Harris
2005-06-06 20:43 ` David Abrahams
2005-06-06 22:44 ` Steven E. Harris
2005-06-06 23:08 ` David Abrahams
2005-06-06 23:47 ` Steven E. Harris
2005-06-07 1:36 ` David Abrahams
2005-06-08 18:14 ` Steven E. Harris
2005-06-08 19:45 ` David Abrahams
2005-06-08 20:14 ` Steven E. Harris
2005-06-08 20:48 ` David Abrahams
2005-06-08 21:20 ` Steven E. Harris
2005-06-23 18:49 ` David Abrahams
2005-06-24 17:14 ` Steven E. Harris
2005-06-24 18:09 ` David Abrahams
2005-06-25 15:33 ` Steven E. Harris
2005-07-19 11:05 ` func-menu David Abrahams
2005-07-19 14:01 ` func-menu J. David Boyd
2005-07-19 14:21 ` func-menu Ted Zlatanov
2005-07-19 14:35 ` func-menu David Abrahams
2005-07-19 15:20 ` func-menu Ted Zlatanov
2005-07-19 15:41 ` func-menu David Abrahams
2005-07-20 1:03 ` Danny Siu [this message]
2005-07-22 14:55 ` func-menu David Abrahams
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=u1x5ui90f.fsf@adobe.com \
--to=dsiu@adobe.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).