traffic-generator/src/ModelRead.cpp
void ReadInjections2(ifstream& modelFile) {
	int value;
	string header;

	modelFile >> header;

	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;

			g_writes[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;


	modelFile >> header;

	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;

			g_reads[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;


	modelFile >> header;

	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;

			g_ccrs[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;


	modelFile >> header;

	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;

			g_dcrs[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;

}
/**
 * Read the injection rates for each message type.
 *
 * @param modelFile The model file stream
 */
Read the injection rates for each message type.
@param modelFile The model file stream
Read the injection rates for each message type . @param modelFile The model file stream
void ReadInjections2(ifstream& modelFile) {
	int value;
	string header;
	modelFile >> header;
	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;
			g_writes[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;
	modelFile >> header;
	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;
			g_reads[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;
	modelFile >> header;
	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;
			g_ccrs[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;
	modelFile >> header;
	while(!PeekForHeader(modelFile, "END")) {
		for(int cl  = 1; cl <= g_numClasses; cl++) {
			modelFile >> value;
			g_dcrs[g_hierClass][cl].Add(value);
		}
	}
	modelFile >> header;
}
void ReadInjections2 ( ifstream & modelFile ) { int value ; string header ; modelFile >> header ; while ( ! PeekForHeader ( modelFile , " " ) ) { for ( int cl = 1 ; cl <= g_numClasses ; cl ++ ) { modelFile >> value ; g_writes [ g_hierClass ] [ cl ] . Add ( value ) ; } } modelFile >> header ; modelFile >> header ; while ( ! PeekForHeader ( modelFile , " " ) ) { for ( int cl = 1 ; cl <= g_numClasses ; cl ++ ) { modelFile >> value ; g_reads [ g_hierClass ] [ cl ] . Add ( value ) ; } } modelFile >> header ; modelFile >> header ; while ( ! PeekForHeader ( modelFile , " " ) ) { for ( int cl = 1 ; cl <= g_numClasses ; cl ++ ) { modelFile >> value ; g_ccrs [ g_hierClass ] [ cl ] . Add ( value ) ; } } modelFile >> header ; modelFile >> header ; while ( ! PeekForHeader ( modelFile , " " ) ) { for ( int cl = 1 ; cl <= g_numClasses ; cl ++ ) { modelFile >> value ; g_dcrs [ g_hierClass ] [ cl ] . Add ( value ) ; } } modelFile >> header ; }
Read the injection rates for each message type.
Read the injection rates for each message type .