
CVS
---

CLucene's source repository is in CVS, in the module 'clucene'.

For information on CVS, see:
http://clucene.sourceforge.net/


Patches
-------
...

Coding Style
------------

CLucene follows a hybrid coding style. Because of the nature of the code being
a java port, there are naturally some java like syntax.

todo: put the coding standard here

* Never use CL_NS_USE(x) in a header file (use CL_NS(x):: for each class), it defeats the purpose of namespaces.
* Use CL_NS_USE(x) in .cpp files if there are more than a few usages of that namespace.

Good development tips
---------------------
When developing, use the available clucene debugging tools:
* _CND_DEBUG - condition debugging, an 'assert' type system
* LUCENE_ENABLE_MEMLEAKTRACKING - to assist in memory leak tracking,
   enable this. This keeps track of clucene object creations 
   and deletions. Always use _CLNEW and _CLDELETE. At the end
   of your program, call:

_lucene_run_objectcheck

lucene::debug::LuceneBase::__cl_PrintUnclosedObjects();
   which prints all the open clucene objects. Then call
lucene::debug::LuceneBase::__cl_ClearMemory();
   which clears all the clucene memory, so that you can
   use other memory tracking tools to further help you
   discover memory leaks
   
__cl_PrintUnclosedObjects returns a list of objects with
the number that it was created at. If your debugger allows 
you to set watches you can add:
_lucene_counter_break
to the watch list and change the value to this number. Then
it will break into CLDebugBreak in the StdHeader.cpp file.

Another trick is to use set:
_lucene_run_objectcheck
 to true. This will check the validity of memory before deleting it.
It can't always help, but may help in some situations.

Good performance tips:
CLucene has a lot of new changes to help improve performance.
Some of them are still being tuned...
LUCENE_ENABLE_MEMORY_POOL helps speed up allocations for small
objects. The types of classes who are pooled are done on a
class by class basis - thus it is still being tuned. More testing
is required to see which classes would benefit from pooling.

MSVC profiling tutorial:
http://webserver.tc.cornell.edu/services/edu/topics/Performance/Profiling/more.asp

For GCC see gprof

Developing
----------
When developing, please keep in mind cross-platform issues and also
character set issues (unicode/ascii).

Hint:
To do a quick test to see if the code compiles
run this command from the root directory of clucene.
It will compile all the CLucene code monolithically.

    % gcc -c -I . -I src src/CLucene/CLMonolithic.cpp
