/[ascend]/trunk/pygtk/interface/instance.cpp
ViewVC logotype

Diff of /trunk/pygtk/interface/instance.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 267 by johnpye, Thu Feb 2 14:02:23 2006 UTC revision 268 by johnpye, Sat Feb 4 06:09:57 2006 UTC
# Line 589  Instanc::getVarStatus() const{ Line 589  Instanc::getVarStatus() const{
589      if(d==NULL){      if(d==NULL){
590          return ASCXX_VAR_STATUS_UNKNOWN;          return ASCXX_VAR_STATUS_UNKNOWN;
591      }      }
592      return d->status;      return d->status;
593  }  }
594    
595    
596    
597    /*------------------------------------------------------
598        Macros to declare
599            setUpperBound
600            setLowerBound
601            setNominal
602        and their 'get' equivalents
603    */
604    
605    #define DEFINE_GET_REAL_CHILD(METHOD,CHILD) \
606        const double \
607        Instanc::get##METHOD() const{ \
608            Instanc c = getChild(CHILD); \
609            return c.getRealValue(); \
610        }
611    
612    #define DEFINE_SET_REAL_CHILD(METHOD,CHILD) \
613        void \
614        Instanc::set##METHOD(const double &v){ \
615            Instanc c = getChild(CHILD); \
616            c.setRealValue(v); \
617        }
618    
619    #define DEFINE_CHILD_METHODS(D) \
620        D(LowerBound,"lower_bound") \
621        D(UpperBound,"upper_bound") \
622        D(Nominal,"nominal")
623    
624    DEFINE_CHILD_METHODS(DEFINE_SET_REAL_CHILD)
625    DEFINE_CHILD_METHODS(DEFINE_GET_REAL_CHILD)
626    
627    //------------------------------------------------------
628        
629    
630  // static properties  // static properties
631  SymChar  SymChar
632  Instanc::fixedsym = SymChar("fixed");  Instanc::fixedsym = SymChar("fixed");

Legend:
Removed from v.267  
changed lines
  Added in v.268

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22