all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Mohitz <coolmohitz@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: emacs function for writing C++ iterator loop
Date: Fri, 29 Jun 2007 00:56:46 -0000	[thread overview]
Message-ID: <1183078606.107965.201180@o61g2000hsh.googlegroups.com> (raw)

I program in C++ using emacs. And i tend to use the C++ iterator a
lot. Now, whenever I want to iterate I always write almost the same
kinda code. So, i want to write a emacs function so that emacs does
that for me.

For example

If i tell emacs that i am iterating on a "deque<ClassName> " variable
with variable name "var" pointing to
"someThing", Emacs should potentially be able to generate the
following

deque<CLassName> var = someThing;
deque<ClassName>::iterator varIterate;
varIterate = var.begin();
while (varIterate != var.end())
{
      ClassName tempClassName;
      tempClassName = *varIterate;

      //Do something with tempClassName

      varIterate++;
}

Any kind of help or pointers to help material would be greatly
appreciated

Thanks
Mohit

             reply	other threads:[~2007-06-29  0:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29  0:56 Mohitz [this message]
2007-06-29  3:22 ` emacs function for writing C++ iterator loop weber
2007-06-29  6:35   ` Mohitz
2007-06-29  7:31     ` Pascal Bourguignon
2007-06-29  7:09 ` Pascal Bourguignon

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=1183078606.107965.201180@o61g2000hsh.googlegroups.com \
    --to=coolmohitz@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.