コード例 #1
0
ファイル: sheet_id.cpp プロジェクト: sythaeryn/pndrpg
//-----------------------------------------------
//	operator=
//
//-----------------------------------------------
CSheetId& CSheetId::operator=( const string& sheetName )
{

	if (!buildSheetId(sheetName))
		*this = Unknown;

	// nldebug("LIST_SHEET_ID: %s (%s)", toString().c_str(), sheetName.c_str());

	return *this;

} // operator= //
コード例 #2
0
//-----------------------------------------------
//	CSheetId
//
//-----------------------------------------------
CSheetId::CSheetId( const string& sheetName )
{
	if (!buildSheetId(sheetName))
	{
		if(sheetName.empty())
			nlwarning("SHEETID: Try to create an CSheetId with empty name. TODO: check why.");
		else
			nlwarning("SHEETID: The sheet '%s' is not in sheet_id.bin, setting it to Unknown",sheetName.c_str());
		//std::string stack;
		//NLMISC::getCallStack(stack);
		//std::vector<std::string> contexts;
		//NLMISC::explode(stack, string("\n"), contexts);
		//nldebug("Dumping callstack :");
		//for (uint i=0; i<contexts.size(); ++i)
		//	nldebug("  %3u : %s", i, contexts[i].c_str());
		*this = Unknown;
	}

} // CSheetId //