Author Topic: How does header statement generated?  (Read 3336 times)

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5927
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
How does header statement generated?
« on: July 16, 2009, 04:12:04 pm »
In each cpp or header file of the code::blocks' source file, there are the code like below:

Code
/*
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
 * http://www.gnu.org/licenses/gpl-3.0.html
 *
 * $Revision: 4909 $
 * $Id: token.cpp 4909 2008-02-27 13:15:26Z mortenmacfly $
 * $HeadURL: svn://svn.berlios.de/codeblocks/trunk/src/plugins/codecompletion/parser/token.cpp $

So, my question is:

these $Revision: number was modified manually? or it is generated automatically?

Thanks.
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7597
    • My Best Post
Re: How does header statement generated?
« Reply #1 on: July 16, 2009, 04:59:20 pm »
In each cpp or header file of the code::blocks' source file, there are the code like below:

Code
/*
 * This file is part of the Code::Blocks IDE and licensed under the GNU General Public License, version 3
 * http://www.gnu.org/licenses/gpl-3.0.html
 *
 * $Revision: 4909 $
 * $Id: token.cpp 4909 2008-02-27 13:15:26Z mortenmacfly $
 * $HeadURL: svn://svn.berlios.de/codeblocks/trunk/src/plugins/codecompletion/parser/token.cpp $

So, my question is:

these $Revision: number was modified manually? or it is generated automatically?

Thanks.

The are tokens (Keyword Substitution) that are replaced in checked into a source control system like CVS/SVN.

Edit: added link: http://svnbook.red-bean.com/en/1.5/svn.advanced.props.special.keywords.html

Tim S.
« Last Edit: July 16, 2009, 05:06:24 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5927
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: How does header statement generated?
« Reply #2 on: July 16, 2009, 05:01:58 pm »
Understand now.
Thanks for your explanation!
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline rhf

  • Multiple posting newcomer
  • *
  • Posts: 123
Re: How does header statement generated?
« Reply #3 on: July 16, 2009, 05:03:42 pm »

So, my question is:

these $Revision: number was modified manually? or it is generated automatically?
See for example the Subversion book: http://svnbook.red-bean.com/nightly/en/svn-book.html#svn.advanced.props.special.keywords