C++ Reference
Programming Terms

Function Signatures

    A function signature consists of the function prototype.  What it tells you is the general information about a function, its name, parameters, what scope it is in, and other miscellaneous information.  C++ "mangle"s function names so that they are pretty, though in all truth they can be very ugly.  On the other hand, mangling or not there is alot of information in a function signature (which is stored internally to most compilers) which is not readily available, but can be accessed.  Consider the following function:

  static const int & Foo::Run(World& W, PrioQ& pq) const;
--- which is the same as (though this function's signature is above...as this is what you must use to define it.):
  class Foo {
    public:
    -- majorly snipped of code--
      static const int & Run(World& W, PrioQ & pq) const;
    -- more snipping... --
  };

The function signature is the one above.  How does one know this, because in order to define the function, one must use the signature...  Though what does the above signature mean?

  static const int & Foo::Run(World& W, PrioQ& pq) const;

static -- this function can only be seen in this file?  No, this means that this function can be called without an instantiated object, as normally member functions (methods) must be called using an instantiation of the class, though with this keyword, you don't need it.

const -- the int that this function returns cannot be changed, because this function returns a reference to an int, you could normally change it, but this particular function does not allow that.

int & -- This is the return type of the function.  This particular function returns an int, but not only that, but it is a reference to an int, so it is not really an int, but behaves as one.

Foo:: -- This function is really a function declared in the scope Foo, which is a class.

Run -- The name of the function.

World& -- The type of the first argument.  This is typical for large objects, as, if they are passed by value, then the entire object (which can be huge) must be copied (if the object is huge, copying it can take a long time) and the reference allows one to modify the object being passed in.

W -- This is the name of the first parameter that the function will use to refer to it.

PrioQ & -- This is the type of the second argument.  This is typical for large objects, as, if they are passed by value, then the entire object (which can be huge) must be copied (if the object is huge, copying it can take a long time) and the reference allows one to modify the object being passed in.

pq -- This is the name of the second parameter, that the function will use to refer to it.

const -- Though this looks like the const on the front of this function, it is not the same.  The const on the end of the function is not the same as the const at the beginning.  This const prevents this function from changing the member variables of the class to which it belongs (in this case Foo).