all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* emacs function for writing C++ iterator loop
@ 2007-06-29  0:56 Mohitz
  2007-06-29  3:22 ` weber
  2007-06-29  7:09 ` Pascal Bourguignon
  0 siblings, 2 replies; 5+ messages in thread
From: Mohitz @ 2007-06-29  0:56 UTC (permalink / raw)
  To: help-gnu-emacs

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-06-29  7:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-29  0:56 emacs function for writing C++ iterator loop Mohitz
2007-06-29  3:22 ` weber
2007-06-29  6:35   ` Mohitz
2007-06-29  7:31     ` Pascal Bourguignon
2007-06-29  7:09 ` Pascal Bourguignon

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.