ECS/Project/Project/RDFP/RDFP.cpp
//	Parse the specified Resource Description.
Parse the specified Resource Description.
Parse the specified Resource Description .
bool RDFP::parseResourceDescription(const std::vector<std::string>& RD, std::map<std::string, ResourceDescription> & RDM)
{
	if (RD[0] != "#Resource Description File")
		std::cerr << "Error! Not A Resource Description File!" << std::endl;
	for (int i = 1; i < RD.size(); i++)
	{
		Check if we should ignore the current line.
		if (shouldIgnoreLine(RD[i]))
		{
			continue;
		}
		Check if we are at the start of the Resource.
		if (RD[i] == "#define Resource")
		{
			bool successfullyParsed = parseResource(RD, i, RDM);
			if (!successfullyParsed)
			{		
				std::cerr << "Error ! Failed to Parse Resource State at line : " << i << std::endl;
				return false;
			}
		}
	}
	return true;
}
bool RDFP :: parseResourceDescription ( const std :: vector < std :: string > & RD , std :: map < std :: string , ResourceDescription > & RDM ) { if ( RD [ 0 ] != " " ) std :: cerr << " " << std :: endl ; for ( int i = 1 ; i < RD . size ( ) ; i ++ ) { if ( shouldIgnoreLine ( RD [ i ] ) ) { continue ; } if ( RD [ i ] == " " ) { bool successfullyParsed = parseResource ( RD , i , RDM ) ; if ( ! successfullyParsed ) { std :: cerr << " " << i << std :: endl ; return false ; } } } return true ; }
Parse the specified Resource Description.
Parse the specified Resource Description .
//	Check if the provided description really is a resource description. //	 //	Check if we should ignore the current line. //	Check if we are at the start of the Resource.