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

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

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

revision 354 by johnpye, Sat Feb 4 06:09:57 2006 UTC revision 355 by johnpye, Mon Mar 6 03:11:28 2006 UTC
# Line 47  Type::Type(){ Line 47  Type::Type(){
47      //cerr << "CREATED EMPTY TYPE" << endl;      //cerr << "CREATED EMPTY TYPE" << endl;
48      // throw runtime_error("Type::Type: Can't create new Types via C++ interface");      // throw runtime_error("Type::Type: Can't create new Types via C++ interface");
49  }  }
50        
51  Type::Type(const TypeDescription *t) : t(t){  Type::Type(const TypeDescription *t) : t(t){
52      //cerr << "CREATED TYPE '" << getName() << "'" << endl;      //cerr << "CREATED TYPE '" << getName() << "'" << endl;
53  }  }
# Line 143  Type::getSimulation(SymChar sym){ Line 143  Type::getSimulation(SymChar sym){
143  #endif  #endif
144          BinTokenSetOptions(bin_srcname.c_str(), bin_objname.c_str(), bin_libname.c_str()          BinTokenSetOptions(bin_srcname.c_str(), bin_objname.c_str(), bin_libname.c_str()
145                              , bin_cmd.c_str(), bin_rm.c_str(), 1000, 1, 0);                              , bin_cmd.c_str(), bin_rm.c_str(), 1000, 1, 0);
146        
147          cerr << "...SETUP BINTOKENS" << endl;          cerr << "...SETUP BINTOKENS" << endl;
148          have_bintoken_setup = true;          have_bintoken_setup = true;
149      }      }
# Line 153  Type::getSimulation(SymChar sym){ Line 153  Type::getSimulation(SymChar sym){
153      /*Instance *i = Instantiate(getInternalType()->name, sym.getInternalType(),      /*Instance *i = Instantiate(getInternalType()->name, sym.getInternalType(),
154                                   0, SymChar("default_self").getInternalType()); */                                   0, SymChar("default_self").getInternalType()); */
155      Instance *i = SimsCreateInstance(getInternalType()->name, sym.getInternalType(), e_normal, SymChar("default_self").getInternalType());      Instance *i = SimsCreateInstance(getInternalType()->name, sym.getInternalType(), e_normal, SymChar("default_self").getInternalType());
156        
157      if(i==NULL){      if(i==NULL){
158          throw runtime_error("Failed to create instance");          throw runtime_error("Failed to create instance");
159      }      }
160    
161      cerr << "CREATED INSTANCE " << sym << " OF " << getName() << endl;      cerr << "CREATED INSTANCE " << sym << " OF " << getName() << endl;
162      return Simulation(i,sym);        return Simulation(i,sym);
163  }  }
164    
165  vector<Method>  vector<Method>
# Line 189  Type::isRefinedSolverVar() const{ Line 189  Type::isRefinedSolverVar() const{
189  }  }
190    
191    
192    const bool
193    Type::hasParameters() const{
194        return TypeHasParameterizedInsts(t);
195    }

Legend:
Removed from v.354  
changed lines
  Added in v.355

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