Exemple #1
0
bool UniPAX::PublicationXref::merge(PublicationXref& object)
{
	if (!object.getYear() != 0)
	{
		if (!getYear() != 0)
		{
			if (getYear() != object.getYear())
			{
				std::cerr << "Error during merging: UniPAX::PublicationXref::year not equal ..."
						<< getYear() << " != " << object.getYear() << std::endl;
				return false;
			}
		}
		else
			setYear(object.getYear());
	}
	{
		std::set<std::string> tmp(getUrls().begin(), getUrls().end());
		for (std::vector<std::string>::iterator it = object.getUrls().begin(); it != object.getUrls().end(); it++)
		{
			tmp.insert(*it);
		}
		getUrls().assign(tmp.begin(), tmp.end());
	}
	if (!object.getTitle().empty())
	{
		if (!getTitle().empty())
		{
			if (getTitle() != object.getTitle())
			{
				std::cerr << "Error during merging: UniPAX::PublicationXref::title not equal ..."
						<< getTitle() << " != " << object.getTitle() << std::endl;
				return false;
			}
		}
		else
			setTitle(object.getTitle());
	}
	{
		std::set<std::string> tmp(getSources().begin(), getSources().end());
		for (std::vector<std::string>::iterator it = object.getSources().begin(); it != object.getSources().end(); it++)
		{
			tmp.insert(*it);
		}
		getSources().assign(tmp.begin(), tmp.end());
	}
	{
		std::set<std::string> tmp(getAuthors().begin(), getAuthors().end());
		for (std::vector<std::string>::iterator it = object.getAuthors().begin(); it != object.getAuthors().end(); it++)
		{
			tmp.insert(*it);
		}
		getAuthors().assign(tmp.begin(), tmp.end());
	}

	return UniPAX::Xref::merge(object);
}
Exemple #2
0
CSplashDlg::CSplashDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CSplashDlg::IDD, pParent)
   , m_copyright_info(_T(""))
{
	//{{AFX_DATA_INIT(CSplashDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT

   m_copyright_info = CString("Copyright (C) 2000-2011 ") + getAuthors();
}
Exemple #3
0
void Plugin::selftest()
{ 
	try
	{
		string value;  
		
		cout << "Testing plugin: " << path << endl;
		
		value = getName();
		if( value.empty() ) cout << "\n\tfound empty name!\n";
		value = getVersion();
		if( value.empty() ) cout << "\n\tfound empty version! (yes, empty version number)\n";
		value = getAuthors();
		if( value.empty() ) cout << "\n\tfound empty authors! meaning: could not find any authors!\n";
		value = getDescription();
		if( value.empty() ) cout << "\n\tfound empty description! meaning: could not find any description!\n";
		value = getCategory();
		if( value.empty() ) cout << "\n\tcategory not found! meaning: could not find any category!\n";
		
		cout << "trying to have parameters registered ...\n";
		registerParameter(); 
		cout << "seems to work ok"<<endl;
		
		cout << "trying to have plugins requested ...\n";
		try{		
			requestPlugins();
		}
		catch(DatabaseError e){
			cout << "CRAP: "<< e.what() << endl;
		}
			
		cout << "seems to work ok."<<endl;
		
		//check on dependencies.  
		cout << "Very well! Basic tests passed!" << endl;
	}
	catch( ... ){
		throw;
	}
	
    
}