/usr/include/tulip/WithDependency.h is in libtulip-dev 3.1.2-2.3ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | //-*-c++-*-
/**
Authors: David Auber, Patrick Mary, Morgan Mathiaut
from the LaBRI Visualization Team
Email : auber@tulip-software.org
Last modification : 13/03/2009
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
*/
#ifndef _TULIPWITHDEPENDENCY
#define _TULIPWITHDEPENDENCY
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <list>
#include <string>
#include <typeinfo>
#include <tulip/tulipconf.h>
namespace tlp {
/** \addtogroup plugins */
/*@{*/
struct Dependency {
std::string factoryName;
std::string pluginName;
std::string pluginRelease;
Dependency(std::string fName, std::string pName,
std::string pRelease) {
factoryName = fName;
pluginName = pName;
pluginRelease = pRelease;
}
};
class WithDependency {
protected:
///
std::list<Dependency> dependencies;
///
void addDependency(const char* factory, const char *name,
const char *release) {
dependencies.push_back(Dependency(factory, name, release));
}
public:
///
std::list<Dependency> getDependencies() {
return dependencies;
}
/** Indicates that the current algorithm depends on the named algorithm of type 'Ty'
* which is supposing to have the parameters specified as second argument.
* If non null the second argument needs to be a null terminated array of character strings.
*/
template<typename Ty> void addDependency(const char* name, const char* release) {
addDependency(typeid(Ty).name(), name, release);
}
};
/*@}*/
}
#endif
|