src/Preprocessor/Processor.cpp
/* Load the data file into a LocatedString 
	return the new located string
	caller is responsible for deleting string
*/
Load the data file into a LocatedString
return the new located string
caller is responsible for deleting string
Load the data file into a LocatedString return the new located string caller is responsible for deleting string
LocatedString* Processor::loadData(const std::wstring data_file_name){
	boost::scoped_ptr<UTF8InputStream> in_scoped_ptr(UTF8InputStream::build(data_file_name.c_str()));
	UTF8InputStream& in(*in_scoped_ptr);
	if(in.fail()){
		char message[500];
		sprintf(message, "Failed to open `%s'", data_file_name.c_str());
		throw UnexpectedInputException("Processor::loadData()", message);
	}
	LocatedString *dataStr = new LocatedString(in, true);	
	return dataStr;
}
LocatedString * Processor :: loadData ( const std :: wstring data_file_name ) { boost :: scoped_ptr < UTF8InputStream > in_scoped_ptr ( UTF8InputStream :: build ( data_file_name . c_str ( ) ) ) ; UTF8InputStream & in ( * in_scoped_ptr ) ; if ( in . fail ( ) ) { char message [ 500 ] ; sprintf ( message , " " , data_file_name . c_str ( ) ) ; throw UnexpectedInputException ( " " , message ) ; } LocatedString * dataStr = new LocatedString ( in , true ) ; return dataStr ; }
Load the data file into a LocatedString
return the new located string
caller is responsible for deleting string
Load the data file into a LocatedString return the new located string caller is responsible for deleting string
//open data file
