47 #ifndef _MIRA_MANIFESTAGENT_H_ 48 #define _MIRA_MANIFESTAGENT_H_ 60 #include <serialization/adapters/boost/shared_ptr.hpp> 71 boost::shared_ptr<VacantClass>
mClass;
75 return other.
mClass == mClass;
78 template<
typename Reflector>
81 r.member(
"Class", mClass,
"" );
82 r.member(
"Parents", mParents,
"" );
111 std::vector< ClassProxy >
const& classes );
116 void setLibraryVersion(
int major,
int minor,
int patch );
123 void addClasses( std::vector< ClassProxy >
const& classes );
134 void loadFile(
Path const& filePath );
139 void saveToFile(
Path const& filePath );
147 template<
typename Reflector>
150 r.member(
"LibraryName", mLibraryName,
"" );
151 r.member(
"LibraryVersion", mVersion,
"" );
152 r.member(
"Classes", mClasses,
"" );
164 # define MIRA_LIB_FOLDER "bin" 166 # define MIRA_LIB_FOLDER "lib" 177 foreach(
const auto& p, manifests)
186 MIRA_LOG(
ERROR) <<
"Failed to load manifest '" << p <<
"': " << ex.message();
Macro for iterating over all elements in a container.
Different functions for searching files or directories.
std::string mLibraryName
Definition: ManifestAgent.h:157
Definition: LibraryRegistry.h:58
$Interface for the hollow class, which loads the library associated with the class if necessary...
boost::shared_ptr< VacantClass > mClass
Definition: ManifestAgent.h:71
void loadFile(Path const &filePath)
Load a single manifest file and announce the contained classes to the class factory.
specialize cv::DataType for our ImgPixel and inherit from cv::DataType<Vec>
Definition: IOService.h:67
boost::filesystem::path Path
Typedef of a Path (shorter version for boost::filesystem::path)
Definition: Path.h:69
MIRA_BASE_EXPORT PathVector findProjectFiles(const Path &file, bool recursive=false)
Same as findFiles above, but using all of the paths contained in $MIRA_PATH variable.
#define MIRA_LOG(level)
Use this macro to log data.
Definition: LoggingCore.h:529
#define MIRA_RETHROW(ex, msg)
Macro for rethrowing an exception with file and line information and for adding additional informatio...
Definition: Exception.h:148
void reflect(Reflector &r)
Definition: ManifestAgent.h:148
LibraryVersion mVersion
Definition: ManifestAgent.h:158
std::vector< std::string > mParents
Definition: ManifestAgent.h:72
Registry for shared libraries.
Core class of the logging library.
Class for managing manifest files.
Definition: ManifestAgent.h:96
bool operator==(const ImgIteratorBase &a, const ImgIteratorBase &b)
Definition: ImgIterator.h:225
Base class for exceptions.
Definition: Exception.h:199
void loadManifests(const Path &pattern=MIRA_LIB_FOLDER"/*.manifest")
Loads all manifest files that match the given file pattern within all paths that are specified in the...
Definition: ManifestAgent.h:173
Simple class encapsulation parent and class information stored in a "real" class object.
Definition: ManifestAgent.h:70
void finalize()
Register the parent - child relationships of the previously loaded files.
Functions for modifying file system paths.
void reflect(Reflector &r)
Definition: ManifestAgent.h:79
#define MIRA_LIB_FOLDER
Definition: ManifestAgent.h:166
Definition: LoggingCore.h:75
std::vector< ManifestClassInfo > mClasses
Definition: ManifestAgent.h:156
ManifestAgent()
Definition: ManifestAgent.h:99