47 #ifndef _MIRA_MANIFESTAGENT_H_ 48 #define _MIRA_MANIFESTAGENT_H_ 60 #include <serialization/adapters/boost/shared_ptr.hpp> 71 boost::shared_ptr<VacantClass>
mClass;
78 template<
typename Reflector>
81 r.member(
"Class",
mClass,
"" );
111 std::vector< ClassProxy >
const& classes );
123 void addClasses( std::vector< ClassProxy >
const& classes );
147 template<
typename Reflector>
151 r.member(
"LibraryVersion",
mVersion,
"" );
152 r.member(
"Classes",
mClasses,
"" );
161 #define MIRA_LIB_FOLDER "lib" 171 foreach(
const auto& p, manifests)
180 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:61
void addClasses(std::vector< ClassProxy > const &classes)
Add the given classes to the manifest agent The functions generates a ManifestClassInfo for every cla...
$Interface for the hollow class, which loads the library associated with the class if necessary...
bool operator==(ManifestClassInfo const &other)
Definition: ManifestAgent.h:74
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
void saveToFile(Path const &filePath)
Serialize the mClasses vector to the given file.
#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:144
void setLibraryVersion(int major, int minor, int patch)
Set version of library.
void reflect(Reflector &r)
Definition: ManifestAgent.h:148
LibraryVersion mVersion
Definition: ManifestAgent.h:158
PathVector findProjectFiles(const Path &file, bool recursive=false)
Same as findFiles above, but using all of the paths contained in $MIRA_PATH variable.
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
Base class for exceptions.
Definition: Exception.h:195
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:167
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:161
Definition: LoggingCore.h:75
std::vector< ManifestClassInfo > mClasses
Definition: ManifestAgent.h:156
ManifestAgent()
Definition: ManifestAgent.h:99