|
GenLIB is a template and subroutines' collection needed by higher libraries like Merlin.
cExceptionto handle exceptions, there are macros to throw with a command an exception, the macro will tell the compiler a message (defined by you), the name library, file, function and line where the error occured.cVector, cListnothing exceptional, just a my implementation of theese know alghorithms.cStrictEnum, cStrictEnumGroupI think it's important to use typesafe. You can't declare a not valid enum with this template. It's useful to substitute the C flags tradition. I.E. if you want to use some flag in C you will do something like this:FLAG_A | FLAG_B | FLAG_C where FLAG_* are macros that indicates a const int. Well it's may be not so good.... I can pass also the number "345" or any other number it's not accepted. But you can use another system to take inputs, cStrictEnum and cStrictEnumGroup: I.E. using theese templates: enum_a + enum_b + enum_c or enum_a In this way you CAN'T pass bad valors. store this information with this code I.E. const int dimension = 100; const int weight = 101; cInfoServer info; info.set(dimension,100); ..... Obviuosly any class know cInfoServer can retrieve the information. |
Web site realized by www.ENERGEMA.it |