model_server/gala_communications/src/Application.cxx
/*------- Building service list code - jwr 7/96 ---------*/
Building service list code - jwr 7/96
Building service list code - jwr 7 / 96
void Application::buildServiceList(const vchar* name,
				   const vchar* titleRegexp)
{
    delete regexp_match;
    if (service_list) {
	   if (service_list->GetRowCount()) {
	      vsession* next;
	      for (int i = 0; i < service_list->GetColumnCount();i++) { 
		     next = (vsession*) service_list->GetCellValue(0, i);
			 next->End();
		     delete next;
	      }
	   }
	   delete service_list;
    }
    regexp_match = new vchar[vcharLength(titleRegexp) + 1];
    vcharCopy(titleRegexp, regexp_match);
    vsessionStatement* statement;
    vscrap* scrapSpec;
    scrapSpec = vscrapCreateDictionary();
    vscrapStoreElement(scrapSpec, vname_Name, vscrapFromString(name));
    statement = vdasserv::MakeMatchStatement(sessionBroker_,scrapSpec);
    statement->SetObserveStatementProc(Application::serviceListNotify);
    statement->Send();
    statement->Block (NULL);
	delete statement;
}
void Application :: buildServiceList ( const vchar * name , const vchar * titleRegexp ) { delete regexp_match ; if ( service_list ) { if ( service_list -> GetRowCount ( ) ) { vsession * next ; for ( int i = 0 ; i < service_list -> GetColumnCount ( ) ; i ++ ) { next = ( vsession * ) service_list -> GetCellValue ( 0 , i ) ; next -> End ( ) ; delete next ; } } delete service_list ; } regexp_match = new vchar [ vcharLength ( titleRegexp ) + 1 ] ; vcharCopy ( titleRegexp , regexp_match ) ; vsessionStatement * statement ; vscrap * scrapSpec ; scrapSpec = vscrapCreateDictionary ( ) ; vscrapStoreElement ( scrapSpec , vname_Name , vscrapFromString ( name ) ) ; statement = vdasserv :: MakeMatchStatement ( sessionBroker_ , scrapSpec ) ; statement -> SetObserveStatementProc ( Application :: serviceListNotify ) ; statement -> Send ( ) ; statement -> Block ( NULL ) ; delete statement ; }
Building service list code - jwr 7/96
Building service list code - jwr 7 / 96
// cleaning and removing service list //statement->SetDestroyWhenFinished (vTRUE);