ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/COMP/BOSS/BossPython/BossSession_wrap.cxx
(Generate patch)

Comparing COMP/BOSS/BossPython/BossSession_wrap.cxx (file contents):
Revision 1.20 by gcodispo, Thu Dec 14 11:40:04 2006 UTC vs.
Revision 1.27 by gcodispo, Thu Mar 8 17:52:39 2007 UTC

# Line 957 | Line 957 | PyObject *BossSession_schedulers(BossSes
957      std::vector<std::string> my_vec = self->showSchedulers();
958      return BossSession_show( self, my_vec );
959    }
960 < PyObject *BossSession_schedListMatch(BossSession *self,std::string const &scheduler,std::string const &schclassad,std::string const &taskid,std::string const &jobid,bool keepfile){
960 > PyObject *BossSession_schedListMatch(BossSession *self,std::string const &scheduler,std::string const &schclassad,std::string const &taskid,std::string const &jobid,unsigned int timeout,bool keepfile){
961      std::vector<std::string> my_vec = self->listMatch( scheduler,
962                                                         schclassad,
963                                                         keepfile,
964                                                         taskid,
965 <                                                       jobid);
965 >                                                       jobid,
966 >                                                       timeout);
967      return BossSession_show( self, my_vec );
968    }
969 < PyObject *BossSession_queryTasks(BossSession *self,int filter_opt,std::string const &taskRange,std::string const &jobRange,std::string const &subn,std::string type,std::string user,std::string after,std::string before,bool avoidCheck){
970 <       if ( !avoidCheck ) {
971 <         self->schedulerQuery ( filter_opt, taskRange, jobRange, subn,
972 <                                type, user, after, before);
973 <       }
974 <       PyObject * job_dict = PyList_New(0);
975 <       std::vector <std::string>
975 <         taskList = self->selectTasks( taskRange, before, after, user);
976 <       for ( std::vector <std::string>::const_iterator it= taskList.begin();
977 <            it!= taskList.end(); ++it ) {
978 <         PyList_Append( job_dict,  PyString_FromString(it->c_str() ) );
969 > PyObject *BossSession_queryTasks(BossSession *self,std::string const &taskName,std::string const &taskRange,std::string after,std::string before,std::string user){
970 >      PyObject * task_list = PyList_New(0);
971 >      std::vector <std::string> taskList;
972 >      if ( taskName.empty() ) {
973 >        taskList = self->selectTasks( taskRange, before, after, user);
974 >      } else {
975 >        taskList = self->selectTasksByName( taskName );
976        }
977 <       return  job_dict;
978 <     }
979 < PyObject *BossTask_appendToPyDict(BossTask const *self,PyObject *dict,BossAttributeContainer const &obj){
983 <      std::string tmp;
984 <      BossAttributeContainer::const_iterator it_end = obj.end ();
985 <      for (BossAttributeContainer::const_iterator it = obj.begin ();
986 <           it != it_end; ++it) {
987 <        tmp = (*it).first.name ();
988 <        char * key = new char[ tmp.size() ];
989 <        key = strdup(tmp.c_str());
990 <        tmp = (*it).second.value ();
991 <        PyObject * val = PyString_FromString( tmp.c_str() );
992 <        PyDict_SetItemString( dict, key, val );
993 <        delete [] key;
977 >      for ( std::vector <std::string>::const_iterator it= taskList.begin();
978 >            it!= taskList.end(); ++it ) {
979 >        PyList_Append( task_list,  PyString_FromString(it->c_str() ) );
980        }
981 <      return dict;
981 >      return  task_list;
982      }
983 < PyObject *BossTask_jobDict(BossTask const *self,std::vector<BossJob * >::const_iterator &jit){
983 > void BossTask_appendToPyDict(BossTask const *self,PyObject *dict,BossAttributeContainer const &obj){
984 >    std::string tmp;
985 >    BossAttributeContainer::const_iterator it_end = obj.end ();
986 >    for (BossAttributeContainer::const_iterator it = obj.begin ();
987 >         it != it_end; ++it) {
988 >
989 >      PyObject * key = PyString_FromString( (it->first.name()).c_str() );
990 >      PyObject * val = PyString_FromString( (*it).second.value ().c_str() );
991 >      PyDict_SetItem( dict, key, val);
992 >      Py_DECREF(key);
993 >      Py_DECREF(val);
994 >    }
995 >    return;
996 >  }
997 > void BossTask_jobDict(BossTask const *self,std::vector<BossJob * >::const_iterator &jit,PyObject *job_dict){
998  
999 <    PyObject * job_dict = PyDict_New();
999 >    //    PyObject * job_dict = PyDict_New();
1000      std::string tmp;
1001  
1002      BossAttributeContainer obj = (*jit)->getTableEntries("JOB");
1003 <    job_dict = BossTask_appendToPyDict ( self, job_dict, obj );
1003 >    BossTask_appendToPyDict ( self, job_dict, obj );
1004  
1005      std::set<std::string> sch = (*jit)->getSchedulerElements();
1006      std::set<std::string>::const_iterator sch_end =  sch.end();
1007      for (std::set<std::string>::const_iterator it =sch.begin();
1008           it != sch_end; ++ it ) {
1009 <      tmp = (*it);
1010 <      char * key = new char[ tmp.size() ];
1011 <      key = strdup(tmp.c_str());
1009 >
1010        tmp = (**jit)["JOB_SCHED_INFO."+(*it)];
1011 +      PyObject * key = PyString_FromString( it->c_str() );
1012        PyObject * val = PyString_FromString( tmp.c_str() );
1013 <      PyDict_SetItemString( job_dict, key, val );
1014 <      delete [] key;
1013 >      PyDict_SetItem( job_dict, key, val);
1014 >      Py_DECREF(key);
1015 >      Py_DECREF(val);
1016      }
1017 <    return job_dict;
1017 >    return;
1018    }
1019   PyObject *BossTask_jobsDict(BossTask *self){
1020    
# Line 1022 | Line 1022 | PyObject *BossTask_jobsDict(BossTask *se
1022      if ( self->job_begin () == self->job_end ()) self->load(ALL);
1023      for (BossTask::job_iterator jit = self->job_begin ();
1024           jit != self->job_end (); ++jit) {
1025 <      std::string id = (*jit)->chainId();
1026 <      PyObject * tmp =  BossTask_jobDict( self, jit );
1027 <      PyObject * myid =  PyString_FromString(id.c_str() );
1028 <      PyDict_SetItem( job_dict, myid,tmp );
1025 >      PyObject * id = PyString_FromString( ((*jit)->chainId()).c_str() );
1026 >      PyObject * tmp_dict = PyDict_New();
1027 >      BossTask_jobDict( self, jit, tmp_dict );
1028 >      PyDict_SetItem( job_dict, id, tmp_dict );
1029 >      Py_DECREF(id);
1030 >      Py_DECREF(tmp_dict);
1031      }
1032      return job_dict;
1033    }
# Line 1070 | Line 1072 | PyObject *BossTask_jobPrograms(BossTask
1072      for ( programs_it = programs.begin(); programs_it != programs_it_end;
1073            ++programs_it  ) {
1074        std::string id = (programs_it->first)["PROGRAM.ID"];
1075 <      PyObject * tmp =  BossTask_progDict( self, programs_it );
1075 >      PyObject * tmp_dict =  BossTask_progDict( self, programs_it );
1076        PyObject * myid =  PyString_FromString(id.c_str() );
1077 <      PyDict_SetItem( job_dict, myid,tmp );
1077 >      PyDict_SetItem( job_dict, myid, tmp_dict );
1078 >      Py_DECREF(myid);
1079 >      Py_DECREF(tmp_dict);
1080      }
1081      return job_dict;
1082    }
# Line 2899 | Line 2903 | static PyObject *_wrap_BossSession_listM
2903      std::string *arg5 = (std::string *) &arg5_defvalue ;
2904      std::string const &arg6_defvalue = "" ;
2905      std::string *arg6 = (std::string *) &arg6_defvalue ;
2906 +    unsigned int arg7 = (unsigned int) 0 ;
2907      std::vector<std::string > result;
2908      std::string temp2 ;
2909      std::string temp3 ;
# Line 2910 | Line 2915 | static PyObject *_wrap_BossSession_listM
2915      PyObject * obj3 = 0 ;
2916      PyObject * obj4 = 0 ;
2917      PyObject * obj5 = 0 ;
2918 +    PyObject * obj6 = 0 ;
2919      
2920 <    if(!PyArg_ParseTuple(args,(char *)"OOO|OOO:BossSession_listMatch",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail;
2920 >    if(!PyArg_ParseTuple(args,(char *)"OOO|OOOO:BossSession_listMatch",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
2921      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
2922      {
2923          if (PyString_Check(obj1)) {
# Line 2953 | Line 2959 | static PyObject *_wrap_BossSession_listM
2959              }
2960          }
2961      }
2962 +    if (obj6) {
2963 +        arg7 = (unsigned int) PyInt_AsLong(obj6);
2964 +        if (PyErr_Occurred()) SWIG_fail;
2965 +    }
2966      {
2967          try {
2968 <            result = (arg1)->listMatch((std::string const &)*arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5,(std::string const &)*arg6);
2968 >            result = (arg1)->listMatch((std::string const &)*arg2,(std::string const &)*arg3,arg4,(std::string const &)*arg5,(std::string const &)*arg6,arg7);
2969              
2970          }catch (const BossSchedFailure & e) {
2971              PyErr_SetString ( SchedulerError, e.what() );
# Line 2991 | Line 3001 | static PyObject *_wrap_BossSession_sched
3001      std::string arg7 = (std::string) "" ;
3002      std::string arg8 = (std::string) "" ;
3003      std::string arg9 = (std::string) "" ;
3004 +    unsigned int arg10 = (unsigned int) 0 ;
3005      std::string temp3 ;
3006      std::string temp4 ;
3007      std::string temp5 ;
# Line 3002 | Line 3013 | static PyObject *_wrap_BossSession_sched
3013      PyObject * obj6 = 0 ;
3014      PyObject * obj7 = 0 ;
3015      PyObject * obj8 = 0 ;
3016 +    PyObject * obj9 = 0 ;
3017      
3018 <    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOO:BossSession_schedulerQuery",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
3018 >    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOOO:BossSession_schedulerQuery",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail;
3019      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
3020      if (obj2) {
3021          {
# Line 3067 | Line 3079 | static PyObject *_wrap_BossSession_sched
3079              SWIG_exception(SWIG_TypeError, "string expected");
3080          }
3081      }
3082 +    if (obj9) {
3083 +        arg10 = (unsigned int) PyInt_AsLong(obj9);
3084 +        if (PyErr_Occurred()) SWIG_fail;
3085 +    }
3086      {
3087          try {
3088 <            (arg1)->schedulerQuery(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9);
3088 >            (arg1)->schedulerQuery(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9,arg10);
3089              
3090          }catch (const BossSchedFailure & e) {
3091              PyErr_SetString ( SchedulerError, e.what() );
# Line 3174 | Line 3190 | static PyObject *_wrap_BossSession_selec
3190   }
3191  
3192  
3193 + static PyObject *_wrap_BossSession_selectTasksByName(PyObject *self, PyObject *args) {
3194 +    PyObject *resultobj;
3195 +    BossSession *arg1 = (BossSession *) 0 ;
3196 +    std::string *arg2 = 0 ;
3197 +    std::vector<std::string > result;
3198 +    std::string temp2 ;
3199 +    PyObject * obj0 = 0 ;
3200 +    PyObject * obj1 = 0 ;
3201 +    
3202 +    if(!PyArg_ParseTuple(args,(char *)"OO:BossSession_selectTasksByName",&obj0,&obj1)) goto fail;
3203 +    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
3204 +    {
3205 +        if (PyString_Check(obj1)) {
3206 +            temp2 = std::string(PyString_AsString(obj1));
3207 +            arg2 = &temp2;
3208 +        }else {
3209 +            SWIG_exception(SWIG_TypeError, "string expected");
3210 +        }
3211 +    }
3212 +    {
3213 +        try {
3214 +            result = (arg1)->selectTasksByName((std::string const &)*arg2);
3215 +            
3216 +        }catch (const BossSchedFailure & e) {
3217 +            PyErr_SetString ( SchedulerError, e.what() );
3218 +            return NULL;
3219 +        }catch (const std::exception& e) {
3220 +            PyErr_SetString ( BossError, e.what() );
3221 +            return NULL;
3222 +        }
3223 +    }
3224 +    {
3225 +        resultobj = PyTuple_New((&result)->size());
3226 +        for (unsigned int i=0; i<(&result)->size(); i++)
3227 +        PyTuple_SetItem(resultobj,i,
3228 +        SwigString_FromString(((std::vector<std::string > &)result)[i]));
3229 +    }
3230 +    return resultobj;
3231 +    fail:
3232 +    return NULL;
3233 + }
3234 +
3235 +
3236   static PyObject *_wrap_BossSession_query(PyObject *self, PyObject *args) {
3237      PyObject *resultobj;
3238      BossSession *arg1 = (BossSession *) 0 ;
# Line 3188 | Line 3247 | static PyObject *_wrap_BossSession_query
3247      std::string arg7 = (std::string) "" ;
3248      std::string arg8 = (std::string) "" ;
3249      std::string arg9 = (std::string) "" ;
3250 <    bool arg10 = (bool) false ;
3250 >    unsigned int arg10 = (unsigned int) 0 ;
3251 >    bool arg11 = (bool) false ;
3252      SwigValueWrapper< std::vector<BossTask * > > result;
3253      std::string temp3 ;
3254      std::string temp4 ;
# Line 3202 | Line 3262 | static PyObject *_wrap_BossSession_query
3262      PyObject * obj7 = 0 ;
3263      PyObject * obj8 = 0 ;
3264      PyObject * obj9 = 0 ;
3265 +    PyObject * obj10 = 0 ;
3266      
3267 <    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOOO:BossSession_query",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail;
3267 >    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOOOO:BossSession_query",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9,&obj10)) goto fail;
3268      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
3269      if (obj2) {
3270          {
# Line 3268 | Line 3329 | static PyObject *_wrap_BossSession_query
3329          }
3330      }
3331      if (obj9) {
3332 <        arg10 = PyInt_AsLong(obj9) ? true : false;
3332 >        arg10 = (unsigned int) PyInt_AsLong(obj9);
3333          if (PyErr_Occurred()) SWIG_fail;
3334      }
3335 +    if (obj10) {
3336 +        arg11 = PyInt_AsLong(obj10) ? true : false;
3337 +        if (PyErr_Occurred()) SWIG_fail;
3338 +    }
3339 +    {
3340 +        try {
3341 +            result = (arg1)->query(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9,arg10,arg11);
3342 +            
3343 +        }catch (const BossSchedFailure & e) {
3344 +            PyErr_SetString ( SchedulerError, e.what() );
3345 +            return NULL;
3346 +        }catch (const std::exception& e) {
3347 +            PyErr_SetString ( BossError, e.what() );
3348 +            return NULL;
3349 +        }
3350 +    }
3351 +    {
3352 +        std::vector<BossTask * > * resultptr;
3353 +        resultptr = new std::vector<BossTask * >((std::vector<BossTask * > &) result);
3354 +        resultobj = SWIG_NewPointerObj((void *) resultptr, SWIGTYPE_p_std__vectorTBossTask_p_t, 1);
3355 +    }
3356 +    return resultobj;
3357 +    fail:
3358 +    return NULL;
3359 + }
3360 +
3361 +
3362 + static PyObject *_wrap_BossSession_getTasksByName(PyObject *self, PyObject *args) {
3363 +    PyObject *resultobj;
3364 +    BossSession *arg1 = (BossSession *) 0 ;
3365 +    std::string *arg2 = 0 ;
3366 +    SwigValueWrapper< std::vector<BossTask * > > result;
3367 +    std::string temp2 ;
3368 +    PyObject * obj0 = 0 ;
3369 +    PyObject * obj1 = 0 ;
3370 +    
3371 +    if(!PyArg_ParseTuple(args,(char *)"OO:BossSession_getTasksByName",&obj0,&obj1)) goto fail;
3372 +    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
3373 +    {
3374 +        if (PyString_Check(obj1)) {
3375 +            temp2 = std::string(PyString_AsString(obj1));
3376 +            arg2 = &temp2;
3377 +        }else {
3378 +            SWIG_exception(SWIG_TypeError, "string expected");
3379 +        }
3380 +    }
3381      {
3382          try {
3383 <            result = (arg1)->query(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9,arg10);
3383 >            result = (arg1)->getTasksByName((std::string const &)*arg2);
3384              
3385          }catch (const BossSchedFailure & e) {
3386              PyErr_SetString ( SchedulerError, e.what() );
# Line 3444 | Line 3551 | static PyObject *_wrap_BossSession_sched
3551      std::string *arg4 = (std::string *) &arg4_defvalue ;
3552      std::string const &arg5_defvalue = "" ;
3553      std::string *arg5 = (std::string *) &arg5_defvalue ;
3554 <    bool arg6 = (bool) false ;
3554 >    unsigned int arg6 = (unsigned int) 0 ;
3555 >    bool arg7 = (bool) false ;
3556      PyObject *result;
3557      std::string temp2 ;
3558      std::string temp3 ;
# Line 3456 | Line 3564 | static PyObject *_wrap_BossSession_sched
3564      PyObject * obj3 = 0 ;
3565      PyObject * obj4 = 0 ;
3566      PyObject * obj5 = 0 ;
3567 +    PyObject * obj6 = 0 ;
3568      
3569 <    if(!PyArg_ParseTuple(args,(char *)"OOO|OOO:BossSession_schedListMatch",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail;
3569 >    if(!PyArg_ParseTuple(args,(char *)"OOO|OOOO:BossSession_schedListMatch",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
3570      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
3571      {
3572          if (PyString_Check(obj1)) {
# Line 3496 | Line 3605 | static PyObject *_wrap_BossSession_sched
3605          }
3606      }
3607      if (obj5) {
3608 <        arg6 = PyInt_AsLong(obj5) ? true : false;
3608 >        arg6 = (unsigned int) PyInt_AsLong(obj5);
3609 >        if (PyErr_Occurred()) SWIG_fail;
3610 >    }
3611 >    if (obj6) {
3612 >        arg7 = PyInt_AsLong(obj6) ? true : false;
3613          if (PyErr_Occurred()) SWIG_fail;
3614      }
3615      {
3616          try {
3617 <            result = (PyObject *)BossSession_schedListMatch(arg1,(std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6);
3617 >            result = (PyObject *)BossSession_schedListMatch(arg1,(std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7);
3618              
3619          }catch (const BossSchedFailure & e) {
3620              PyErr_SetString ( SchedulerError, e.what() );
# Line 3521 | Line 3634 | static PyObject *_wrap_BossSession_sched
3634   static PyObject *_wrap_BossSession_queryTasks(PyObject *self, PyObject *args) {
3635      PyObject *resultobj;
3636      BossSession *arg1 = (BossSession *) 0 ;
3637 <    int arg2 = (int) SCHEDULED ;
3637 >    std::string const &arg2_defvalue = "" ;
3638 >    std::string *arg2 = (std::string *) &arg2_defvalue ;
3639      std::string const &arg3_defvalue = "all" ;
3640      std::string *arg3 = (std::string *) &arg3_defvalue ;
3641 <    std::string const &arg4_defvalue = "all" ;
3642 <    std::string *arg4 = (std::string *) &arg4_defvalue ;
3529 <    std::string const &arg5_defvalue = "" ;
3530 <    std::string *arg5 = (std::string *) &arg5_defvalue ;
3641 >    std::string arg4 = (std::string) "" ;
3642 >    std::string arg5 = (std::string) "" ;
3643      std::string arg6 = (std::string) "" ;
3532    std::string arg7 = (std::string) "" ;
3533    std::string arg8 = (std::string) "" ;
3534    std::string arg9 = (std::string) "" ;
3535    bool arg10 = (bool) false ;
3644      PyObject *result;
3645 +    std::string temp2 ;
3646      std::string temp3 ;
3538    std::string temp4 ;
3539    std::string temp5 ;
3647      PyObject * obj0 = 0 ;
3648 +    PyObject * obj1 = 0 ;
3649      PyObject * obj2 = 0 ;
3650      PyObject * obj3 = 0 ;
3651      PyObject * obj4 = 0 ;
3652      PyObject * obj5 = 0 ;
3545    PyObject * obj6 = 0 ;
3546    PyObject * obj7 = 0 ;
3547    PyObject * obj8 = 0 ;
3548    PyObject * obj9 = 0 ;
3653      
3654 <    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOOO:BossSession_queryTasks",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail;
3654 >    if(!PyArg_ParseTuple(args,(char *)"O|OOOOO:BossSession_queryTasks",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail;
3655      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossSession,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
3656 <    if (obj2) {
3553 <        {
3554 <            if (PyString_Check(obj2)) {
3555 <                temp3 = std::string(PyString_AsString(obj2));
3556 <                arg3 = &temp3;
3557 <            }else {
3558 <                SWIG_exception(SWIG_TypeError, "string expected");
3559 <            }
3560 <        }
3561 <    }
3562 <    if (obj3) {
3656 >    if (obj1) {
3657          {
3658 <            if (PyString_Check(obj3)) {
3659 <                temp4 = std::string(PyString_AsString(obj3));
3660 <                arg4 = &temp4;
3658 >            if (PyString_Check(obj1)) {
3659 >                temp2 = std::string(PyString_AsString(obj1));
3660 >                arg2 = &temp2;
3661              }else {
3662                  SWIG_exception(SWIG_TypeError, "string expected");
3663              }
3664          }
3665      }
3666 <    if (obj4) {
3666 >    if (obj2) {
3667          {
3668 <            if (PyString_Check(obj4)) {
3669 <                temp5 = std::string(PyString_AsString(obj4));
3670 <                arg5 = &temp5;
3668 >            if (PyString_Check(obj2)) {
3669 >                temp3 = std::string(PyString_AsString(obj2));
3670 >                arg3 = &temp3;
3671              }else {
3672                  SWIG_exception(SWIG_TypeError, "string expected");
3673              }
3674          }
3675      }
3676 <    if (obj5) {
3583 <        {
3584 <            if (PyString_Check(obj5))
3585 <            arg6 = std::string(PyString_AsString(obj5));
3586 <            else
3587 <            SWIG_exception(SWIG_TypeError, "string expected");
3588 <        }
3589 <    }
3590 <    if (obj6) {
3676 >    if (obj3) {
3677          {
3678 <            if (PyString_Check(obj6))
3679 <            arg7 = std::string(PyString_AsString(obj6));
3678 >            if (PyString_Check(obj3))
3679 >            arg4 = std::string(PyString_AsString(obj3));
3680              else
3681              SWIG_exception(SWIG_TypeError, "string expected");
3682          }
3683      }
3684 <    if (obj7) {
3684 >    if (obj4) {
3685          {
3686 <            if (PyString_Check(obj7))
3687 <            arg8 = std::string(PyString_AsString(obj7));
3686 >            if (PyString_Check(obj4))
3687 >            arg5 = std::string(PyString_AsString(obj4));
3688              else
3689              SWIG_exception(SWIG_TypeError, "string expected");
3690          }
3691      }
3692 <    if (obj8) {
3692 >    if (obj5) {
3693          {
3694 <            if (PyString_Check(obj8))
3695 <            arg9 = std::string(PyString_AsString(obj8));
3694 >            if (PyString_Check(obj5))
3695 >            arg6 = std::string(PyString_AsString(obj5));
3696              else
3697              SWIG_exception(SWIG_TypeError, "string expected");
3698          }
3699      }
3614    if (obj9) {
3615        arg10 = PyInt_AsLong(obj9) ? true : false;
3616        if (PyErr_Occurred()) SWIG_fail;
3617    }
3700      {
3701          try {
3702 <            result = (PyObject *)BossSession_queryTasks(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7,arg8,arg9,arg10);
3702 >            result = (PyObject *)BossSession_queryTasks(arg1,(std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5,arg6);
3703              
3704          }catch (const BossSchedFailure & e) {
3705              PyErr_SetString ( SchedulerError, e.what() );
# Line 4611 | Line 4693 | static PyObject *_wrap_BossTask_submit(P
4693      std::string *arg5 = (std::string *) &arg5_defvalue ;
4694      std::string const &arg6_defvalue = "" ;
4695      std::string *arg6 = (std::string *) &arg6_defvalue ;
4696 <    bool arg7 = (bool) false ;
4696 >    unsigned int arg7 = (unsigned int) 0 ;
4697 >    bool arg8 = (bool) false ;
4698      int result;
4699      std::string temp2 ;
4700      std::string temp3 ;
# Line 4625 | Line 4708 | static PyObject *_wrap_BossTask_submit(P
4708      PyObject * obj4 = 0 ;
4709      PyObject * obj5 = 0 ;
4710      PyObject * obj6 = 0 ;
4711 +    PyObject * obj7 = 0 ;
4712      
4713 <    if(!PyArg_ParseTuple(args,(char *)"O|OOOOOO:BossTask_submit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) goto fail;
4713 >    if(!PyArg_ParseTuple(args,(char *)"O|OOOOOOO:BossTask_submit",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) goto fail;
4714      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossTask,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
4715      if (obj1) {
4716          {
# Line 4679 | Line 4763 | static PyObject *_wrap_BossTask_submit(P
4763          }
4764      }
4765      if (obj6) {
4766 <        arg7 = PyInt_AsLong(obj6) ? true : false;
4766 >        arg7 = (unsigned int) PyInt_AsLong(obj6);
4767 >        if (PyErr_Occurred()) SWIG_fail;
4768 >    }
4769 >    if (obj7) {
4770 >        arg8 = PyInt_AsLong(obj7) ? true : false;
4771          if (PyErr_Occurred()) SWIG_fail;
4772      }
4773      {
4774          try {
4775 <            result = (int)(arg1)->submit((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,(std::string const &)*arg6,arg7);
4775 >            result = (int)(arg1)->submit((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5,(std::string const &)*arg6,arg7,arg8);
4776              
4777          }catch (const BossSchedFailure & e) {
4778              PyErr_SetString ( SchedulerError, e.what() );
# Line 4749 | Line 4837 | static PyObject *_wrap_BossTask_kill(PyO
4837      PyObject *resultobj;
4838      BossTask *arg1 = (BossTask *) 0 ;
4839      std::string *arg2 = 0 ;
4840 <    bool arg3 = (bool) false ;
4840 >    unsigned int arg3 = (unsigned int) 0 ;
4841 >    bool arg4 = (bool) false ;
4842      int result;
4843      std::string temp2 ;
4844      PyObject * obj0 = 0 ;
4845      PyObject * obj1 = 0 ;
4846      PyObject * obj2 = 0 ;
4847 +    PyObject * obj3 = 0 ;
4848      
4849 <    if(!PyArg_ParseTuple(args,(char *)"OO|O:BossTask_kill",&obj0,&obj1,&obj2)) goto fail;
4849 >    if(!PyArg_ParseTuple(args,(char *)"OO|OO:BossTask_kill",&obj0,&obj1,&obj2,&obj3)) goto fail;
4850      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossTask,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
4851      {
4852          if (PyString_Check(obj1)) {
# Line 4767 | Line 4857 | static PyObject *_wrap_BossTask_kill(PyO
4857          }
4858      }
4859      if (obj2) {
4860 <        arg3 = PyInt_AsLong(obj2) ? true : false;
4860 >        arg3 = (unsigned int) PyInt_AsLong(obj2);
4861 >        if (PyErr_Occurred()) SWIG_fail;
4862 >    }
4863 >    if (obj3) {
4864 >        arg4 = PyInt_AsLong(obj3) ? true : false;
4865          if (PyErr_Occurred()) SWIG_fail;
4866      }
4867      {
4868          try {
4869 <            result = (int)(arg1)->kill((std::string const &)*arg2,arg3);
4869 >            result = (int)(arg1)->kill((std::string const &)*arg2,arg3,arg4);
4870              
4871          }catch (const BossSchedFailure & e) {
4872              PyErr_SetString ( SchedulerError, e.what() );
# Line 4796 | Line 4890 | static PyObject *_wrap_BossTask_getOutpu
4890      std::string *arg2 = (std::string *) &arg2_defvalue ;
4891      std::string const &arg3_defvalue = "" ;
4892      std::string *arg3 = (std::string *) &arg3_defvalue ;
4893 <    bool arg4 = (bool) false ;
4893 >    unsigned int arg4 = (unsigned int) 0 ;
4894      bool arg5 = (bool) false ;
4895 +    bool arg6 = (bool) false ;
4896      int result;
4897      std::string temp2 ;
4898      std::string temp3 ;
# Line 4806 | Line 4901 | static PyObject *_wrap_BossTask_getOutpu
4901      PyObject * obj2 = 0 ;
4902      PyObject * obj3 = 0 ;
4903      PyObject * obj4 = 0 ;
4904 +    PyObject * obj5 = 0 ;
4905      
4906 <    if(!PyArg_ParseTuple(args,(char *)"O|OOOO:BossTask_getOutput",&obj0,&obj1,&obj2,&obj3,&obj4)) goto fail;
4906 >    if(!PyArg_ParseTuple(args,(char *)"O|OOOOO:BossTask_getOutput",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) goto fail;
4907      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossTask,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
4908      if (obj1) {
4909          {
# Line 4830 | Line 4926 | static PyObject *_wrap_BossTask_getOutpu
4926          }
4927      }
4928      if (obj3) {
4929 <        arg4 = PyInt_AsLong(obj3) ? true : false;
4929 >        arg4 = (unsigned int) PyInt_AsLong(obj3);
4930          if (PyErr_Occurred()) SWIG_fail;
4931      }
4932      if (obj4) {
4933          arg5 = PyInt_AsLong(obj4) ? true : false;
4934          if (PyErr_Occurred()) SWIG_fail;
4935      }
4936 +    if (obj5) {
4937 +        arg6 = PyInt_AsLong(obj5) ? true : false;
4938 +        if (PyErr_Occurred()) SWIG_fail;
4939 +    }
4940      {
4941          try {
4942 <            result = (int)(arg1)->getOutput((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5);
4942 >            result = (int)(arg1)->getOutput((std::string const &)*arg2,(std::string const &)*arg3,arg4,arg5,arg6);
4943 >            
4944 >        }catch (const BossSchedFailure & e) {
4945 >            PyErr_SetString ( SchedulerError, e.what() );
4946 >            return NULL;
4947 >        }catch (const std::exception& e) {
4948 >            PyErr_SetString ( BossError, e.what() );
4949 >            return NULL;
4950 >        }
4951 >    }
4952 >    resultobj = PyInt_FromLong((long)result);
4953 >    return resultobj;
4954 >    fail:
4955 >    return NULL;
4956 > }
4957 >
4958 >
4959 > static PyObject *_wrap_BossTask_loadByName(PyObject *self, PyObject *args) {
4960 >    PyObject *resultobj;
4961 >    BossTask *arg1 = (BossTask *) 0 ;
4962 >    std::string *arg2 = 0 ;
4963 >    int result;
4964 >    std::string temp2 ;
4965 >    PyObject * obj0 = 0 ;
4966 >    PyObject * obj1 = 0 ;
4967 >    
4968 >    if(!PyArg_ParseTuple(args,(char *)"OO:BossTask_loadByName",&obj0,&obj1)) goto fail;
4969 >    if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossTask,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
4970 >    {
4971 >        if (PyString_Check(obj1)) {
4972 >            temp2 = std::string(PyString_AsString(obj1));
4973 >            arg2 = &temp2;
4974 >        }else {
4975 >            SWIG_exception(SWIG_TypeError, "string expected");
4976 >        }
4977 >    }
4978 >    {
4979 >        try {
4980 >            result = (int)(arg1)->loadByName((std::string const &)*arg2);
4981              
4982          }catch (const BossSchedFailure & e) {
4983              PyErr_SetString ( SchedulerError, e.what() );
# Line 4964 | Line 5102 | static PyObject *_wrap_BossTask_query(Py
5102      std::string arg6 = (std::string) "" ;
5103      std::string arg7 = (std::string) "" ;
5104      std::string arg8 = (std::string) "" ;
5105 <    bool arg9 = (bool) false ;
5105 >    unsigned int arg9 = (unsigned int) 0 ;
5106 >    bool arg10 = (bool) false ;
5107      int result;
5108      std::string temp3 ;
5109      std::string temp4 ;
# Line 4976 | Line 5115 | static PyObject *_wrap_BossTask_query(Py
5115      PyObject * obj6 = 0 ;
5116      PyObject * obj7 = 0 ;
5117      PyObject * obj8 = 0 ;
5118 +    PyObject * obj9 = 0 ;
5119      
5120 <    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOO:BossTask_query",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) goto fail;
5120 >    if(!PyArg_ParseTuple(args,(char *)"O|iOOOOOOOO:BossTask_query",&obj0,&arg2,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) goto fail;
5121      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossTask,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
5122      if (obj2) {
5123          {
# Line 5032 | Line 5172 | static PyObject *_wrap_BossTask_query(Py
5172          }
5173      }
5174      if (obj8) {
5175 <        arg9 = PyInt_AsLong(obj8) ? true : false;
5175 >        arg9 = (unsigned int) PyInt_AsLong(obj8);
5176 >        if (PyErr_Occurred()) SWIG_fail;
5177 >    }
5178 >    if (obj9) {
5179 >        arg10 = PyInt_AsLong(obj9) ? true : false;
5180          if (PyErr_Occurred()) SWIG_fail;
5181      }
5182      {
5183          try {
5184 <            result = (int)(arg1)->query(arg2,(std::string const &)*arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,arg9);
5184 >            result = (int)(arg1)->query(arg2,(std::string const &)*arg3,(std::string const &)*arg4,arg5,arg6,arg7,arg8,arg9,arg10);
5185              
5186          }catch (const BossSchedFailure & e) {
5187              PyErr_SetString ( SchedulerError, e.what() );
# Line 5148 | Line 5292 | static PyObject *_wrap_BossTask_appendTo
5292      BossTask *arg1 = (BossTask *) 0 ;
5293      PyObject *arg2 = (PyObject *) 0 ;
5294      BossAttributeContainer *arg3 = 0 ;
5151    PyObject *result;
5295      PyObject * obj0 = 0 ;
5296      PyObject * obj1 = 0 ;
5297      PyObject * obj2 = 0 ;
# Line 5162 | Line 5305 | static PyObject *_wrap_BossTask_appendTo
5305      }
5306      {
5307          try {
5308 <            result = (PyObject *)BossTask_appendToPyDict((BossTask const *)arg1,arg2,(BossAttributeContainer const &)*arg3);
5308 >            BossTask_appendToPyDict((BossTask const *)arg1,arg2,(BossAttributeContainer const &)*arg3);
5309              
5310          }catch (const BossSchedFailure & e) {
5311              PyErr_SetString ( SchedulerError, e.what() );
# Line 5172 | Line 5315 | static PyObject *_wrap_BossTask_appendTo
5315              return NULL;
5316          }
5317      }
5318 <    resultobj = result;
5318 >    Py_INCREF(Py_None); resultobj = Py_None;
5319      return resultobj;
5320      fail:
5321      return NULL;
# Line 5183 | Line 5326 | static PyObject *_wrap_BossTask_jobDict(
5326      PyObject *resultobj;
5327      BossTask *arg1 = (BossTask *) 0 ;
5328      std::vector<BossJob * >::const_iterator *arg2 = 0 ;
5329 <    PyObject *result;
5329 >    PyObject *arg3 = (PyObject *) 0 ;
5330      PyObject * obj0 = 0 ;
5331      PyObject * obj1 = 0 ;
5332 +    PyObject * obj2 = 0 ;
5333      
5334 <    if(!PyArg_ParseTuple(args,(char *)"OO:BossTask_jobDict",&obj0,&obj1)) goto fail;
5334 >    if(!PyArg_ParseTuple(args,(char *)"OOO:BossTask_jobDict",&obj0,&obj1,&obj2)) goto fail;
5335      if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_BossTask,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
5336      if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_std__vectorTBossJob_p_t__const_iterator,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
5337      if (arg2 == NULL) {
5338          PyErr_SetString(PyExc_TypeError,"null reference"); SWIG_fail;
5339      }
5340 +    arg3 = obj2;
5341      {
5342          try {
5343 <            result = (PyObject *)BossTask_jobDict((BossTask const *)arg1,*arg2);
5343 >            BossTask_jobDict((BossTask const *)arg1,*arg2,arg3);
5344              
5345          }catch (const BossSchedFailure & e) {
5346              PyErr_SetString ( SchedulerError, e.what() );
# Line 5205 | Line 5350 | static PyObject *_wrap_BossTask_jobDict(
5350              return NULL;
5351          }
5352      }
5353 <    resultobj = result;
5353 >    Py_INCREF(Py_None); resultobj = Py_None;
5354      return resultobj;
5355      fail:
5356      return NULL;
# Line 6289 | Line 6434 | static PyMethodDef SwigMethods[] = {
6434           { (char *)"BossSession_listMatch", _wrap_BossSession_listMatch, METH_VARARGS },
6435           { (char *)"BossSession_schedulerQuery", _wrap_BossSession_schedulerQuery, METH_VARARGS },
6436           { (char *)"BossSession_selectTasks", _wrap_BossSession_selectTasks, METH_VARARGS },
6437 +         { (char *)"BossSession_selectTasksByName", _wrap_BossSession_selectTasksByName, METH_VARARGS },
6438           { (char *)"BossSession_query", _wrap_BossSession_query, METH_VARARGS },
6439 +         { (char *)"BossSession_getTasksByName", _wrap_BossSession_getTasksByName, METH_VARARGS },
6440           { (char *)"BossSession_show", _wrap_BossSession_show, METH_VARARGS },
6441           { (char *)"BossSession_CHTools", _wrap_BossSession_CHTools, METH_VARARGS },
6442           { (char *)"BossSession_ProgramTypes", _wrap_BossSession_ProgramTypes, METH_VARARGS },
# Line 6322 | Line 6469 | static PyMethodDef SwigMethods[] = {
6469           { (char *)"BossTask_reSubmit", _wrap_BossTask_reSubmit, METH_VARARGS },
6470           { (char *)"BossTask_kill", _wrap_BossTask_kill, METH_VARARGS },
6471           { (char *)"BossTask_getOutput", _wrap_BossTask_getOutput, METH_VARARGS },
6472 +         { (char *)"BossTask_loadByName", _wrap_BossTask_loadByName, METH_VARARGS },
6473           { (char *)"BossTask_load", _wrap_BossTask_load, METH_VARARGS },
6474           { (char *)"BossTask_query", _wrap_BossTask_query, METH_VARARGS },
6475           { (char *)"BossTask_query_out", _wrap_BossTask_query_out, METH_VARARGS },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines