qaengine/src/TaskDriver.cxx
//-------------------------------------------------------------------------------
// Sets policy file name and creates a policy tree from the given policy file.
//-------------------------------------------------------------------------------
Sets policy file name and creates a policy tree from the given policy file.
Sets policy file name and creates a policy tree from the given policy file .
int TaskDriver::openPolicy(string fileName) {
	if(m_durtyPolicy && m_strPolicy.length()>0) {
		savePolicy(m_strPolicy);
	    m_durtyPolicy = 0;
	}
	if(m_pPolicy) delete m_pPolicy;
    m_pPolicy= new PolicyTree();
	if(m_pPolicy->open(fileName)!=0) {
		delete m_pPolicy;
		m_pPolicy = NULL;
		return -1;
	}
	m_strPolicy = fileName;
	return 0;
}
int TaskDriver :: openPolicy ( string fileName ) { if ( m_durtyPolicy && m_strPolicy . length ( ) > 0 ) { savePolicy ( m_strPolicy ) ; m_durtyPolicy = 0 ; } if ( m_pPolicy ) delete m_pPolicy ; m_pPolicy = new PolicyTree ( ) ; if ( m_pPolicy -> open ( fileName ) != 0 ) { delete m_pPolicy ; m_pPolicy = NULL ; return -1 ; } m_strPolicy = fileName ; return 0 ; }
Sets policy file name and creates a policy tree from the given policy file.
Sets policy file name and creates a policy tree from the given policy file .