GFGApp::GFGApp
	(
	int*		argc,
	char*		argv[],
	JBoolean*	displayAbout,
	JString*	prevVersStr
	)
	:
	JXApplication(argc, argv, kAppSignature, kGFGDefaultStringData),
	itsDeletingTemplate(kJFalse)
{
	*displayAbout = GFGCreateGlobals(this);

	if (!*displayAbout)
		{
		*prevVersStr = (GFGGetPrefsManager())->GetPrevVersionStr();
		if (*prevVersStr == GFGGetVersionNumberStr())
			{
			prevVersStr->Clear();
			}
		else
			{
			*displayAbout = kJTrue;
			}
		}
	else
		{
		prevVersStr->Clear();
		}
}
Exemple #2
0
void
GFGClass::WriteFunction
	(
	ostream& 			os,
	GFGMemberFunction*	fn,
	const JBoolean		interface
	)
{
	if (interface)
		{
		fn->GetInterface().Print(os);
		os << endl;
		return;
		}

	JString access	= "public";
	if (fn->IsProtected())
		{
		access	= "protected";
		}

	JString s	= GFGGetPrefsManager()->GetFunctionComment(fn->GetFnName(), access);
	s.Print(os);

	fn->GetReturnType().Print(os);
	os << endl;
	
	itsClassName.Print(os);
	os << "::";
	fn->GetFnName().Print(os);
	const JSize count	= fn->GetArgCount();
	if (count == 0)
		{
		os << "()" << endl;
		}
	else
		{
		os << "\n\t(\n";
		for (JIndex i = 1; i <= count; i++)
			{
			JString arg	= fn->GetArg(i);
			os << "\t";
			arg.Print(os);
			if (i != count)
				{
				os << ",";
				}
			os << endl;
			}
		os << "\t)" << endl;
		}
	if (fn->IsConst())
		{
		os << "\tconst" << endl;
		}
	os << "{\n\n}" << endl << endl;
}