Show
Ignore:
Timestamp:
05/11/08 12:53:42 (8 months ago)
Author:
rjrw
Message:

Change molecule structure to class

Make molecular column table easier to navigate (after Nick Abel's
suggestion).

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/newmole/source/mole_reactions.cpp

    r2027 r2042  
    450450{ 
    451451        struct mole_reaction_s *rate; 
    452         struct molecule    *sp; 
     452        molecule    *sp; 
    453453        ratefunc func; 
    454454        mole_reaction_i p; 
     
    558558                 required (look for references to "reactants[0]" for examples) */ 
    559559        qsort((void *)rate->reactants,(size_t)rate->nreactants, 
    560                                 sizeof(struct molecule *),mole_cmp); 
     560                                sizeof(molecule *),mole_cmp); 
    561561        qsort((void *)rate->products,(size_t)rate->nproducts, 
    562                                 sizeof(struct molecule *),mole_cmp); 
     562                                sizeof(molecule *),mole_cmp); 
    563563 
    564564        ASSERT(lgReactBalance(rate)); /* Verify rate conserves particles and charge */ 
     
    16831683class formula_species { 
    16841684public: 
    1685         struct molecule *reactants[MAXREACTANTS], *products[MAXPRODUCTS]; 
     1685        molecule *reactants[MAXREACTANTS], *products[MAXPRODUCTS]; 
    16861686}; 
    16871687 
     
    17671767    } 
    17681768  } 
    1769         qsort((void *)r->l.reactants,(size_t)i,sizeof(struct molecule *), 
     1769        qsort((void *)r->l.reactants,(size_t)i,sizeof(molecule *), 
    17701770                                mole_cmp); 
    17711771 
     
    17871787    } 
    17881788  } 
    1789         qsort((void *)r->l.products,(size_t)i,sizeof(struct molecule *), 
     1789        qsort((void *)r->l.products,(size_t)i,sizeof(molecule *), 
    17901790                                mole_cmp); 
    17911791 
     
    29332933        double ratev, ratevi; 
    29342934        struct mole_reaction_s *rate; 
    2935         struct molecule *sp; 
     2935        molecule *sp; 
    29362936 
    29372937        DEBUG_ENTRY("mole_sink_rate()"); 
     
    29902990        double ratev, ratevi; 
    29912991        struct mole_reaction_s *rate; 
    2992         struct molecule *sp, *ph; 
     2992        molecule *sp, *ph; 
    29932993 
    29942994        DEBUG_ENTRY("mole_dissoc_rate()"); 
     
    30443044        double ratev, ratevi; 
    30453045        struct mole_reaction_s *rate; 
    3046         struct molecule *sp; 
     3046        molecule *sp; 
    30473047 
    30483048        DEBUG_ENTRY("mole_source_rate()"); 
     
    31403140        double ratevi; 
    31413141        struct mole_reaction_s *rate; 
    3142         struct molecule *sp; 
     3142        molecule *sp; 
    31433143 
    31443144        DEBUG_ENTRY("mole_punch()");