[Dev-C++] Class definition across multiple files and general wrapper class design
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Scott S. <age...@co...> - 2004-09-21 01:17:04
|
In learning OpenGL, I have decided to write my own small wrapper class that provides me basic funcitons like setting up a window and so forth to speed up the learning process. I have begun to write the wrapper class, but have several questions: 1. Can I span the class definition across multiple files, or must I stich to the decleration in one .h file and the definition in a .cpp file? 2. I have heard some people say you should only define one function per .cpp file in a library due to size issues. Is this true, and if so, is it worth the added effort? 3. What is the level of documentation required for a basic wrapper class? I stick to a header at the top of each file, function headers, and in code comments. Will it be necessary to include any external documentation at this point? 4. Should I just use several functions in a namespace instead of a class to simplify the development process? 5. Are there any long term pros/cons associated with maintanence of a class versus functions in a namespace? Thank you in advanced for any advice you may have and answers to my questions. I have never done anything like this before, and want to make sure I do it correctly. -- --Scott Simontis-- |