Ignore:
Timestamp:
Oct 14, 2005, 9:43:27 AM (19 years ago)
Author:
dkearney
Message:

This update brings us one step closer to being const correct in the RpUnits
class. Added a few more comments. All other files touched were made to
comply with the new const correct RpUnits.[h,cc]

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cee/RpUnitsCInterface.cc

    r93 r104  
    1717#endif
    1818
    19 RpUnits*
    20 rpDefineUnit(const char* unitSymbol, RpUnits* basis) {
     19const RpUnits*
     20rpDefineUnit(const char* unitSymbol, const RpUnits* basis) {
    2121
    2222    return RpUnits::define(unitSymbol, basis);
    2323}
    2424
    25 RpUnits*
    26 rpDefineConv(    RpUnits* fromUnit,
    27                RpUnits* toUnit,
     25const RpUnits*
     26rpDefineConv(  const RpUnits* fromUnit,
     27               const RpUnits* toUnit,
    2828               double (*convForwFxnPtr)(double),
    2929               double (*convBackFxnPtr)(double)    ) {
     
    3232}
    3333
    34 RpUnits*
     34const RpUnits*
    3535rpFind ( const char* key ) {
    3636
     
    3939
    4040const char*
    41 rpGetUnits ( RpUnits* unit ) {
     41rpGetUnits ( const RpUnits* unit ) {
    4242
    4343    static std::string retVal;
     
    4747
    4848const char*
    49 rpGetUnitsName ( RpUnits* unit ) {
     49rpGetUnitsName ( const RpUnits* unit ) {
    5050
    5151    static std::string retVal;
     
    5555
    5656double
    57 rpGetExponent ( RpUnits* unit ) {
     57rpGetExponent ( const RpUnits* unit ) {
    5858
    5959    return unit->getExponent();
    6060}
    6161
    62 RpUnits*
    63 rpGetBasis ( RpUnits* unit ) {
     62const RpUnits*
     63rpGetBasis ( const RpUnits* unit ) {
    6464
    6565    return unit->getBasis();
     
    6767
    6868int
    69 rpMakeMetric(RpUnits* basis) {
     69rpMakeMetric(const RpUnits* basis) {
    7070
    7171    return RpUnits::makeMetric(basis);
     
    9595
    9696const char*
    97 rpConvert_ObjStr ( RpUnits* fromUnits,
    98                    RpUnits* toUnits,
     97rpConvert_ObjStr ( const RpUnits* fromUnits,
     98                   const RpUnits* toUnits,
    9999                   double val,
    100100                   int showUnits,
     
    124124
    125125double
    126 rpConvert_ObjDbl (   RpUnits* fromUnits,
    127                      RpUnits* toUnits,
     126rpConvert_ObjDbl (   const RpUnits* fromUnits,
     127                     const RpUnits* toUnits,
    128128                     double val,
    129129                     int* result ) {
Note: See TracChangeset for help on using the changeset viewer.