16 #ifndef SURGSIM_FRAMEWORK_ASSET_H 17 #define SURGSIM_FRAMEWORK_ASSET_H 28 class ApplicationData;
63 void load(
const std::string& fileName);
78 virtual bool doLoad(
const std::string& filePath) = 0;
93 #endif // SURGSIM_FRAMEWORK_ASSET_H void serializeFileName(SurgSim::Framework::Accessible *accessible)
Wrap the registration calls for the filename property, which is more complicated due to the overloade...
Definition: Asset.cpp:63
Definition: CompoundShapeToGraphics.cpp:29
This class is used to facilitate file loading.
Definition: Asset.h:39
Enable searching for files in a given list of paths, give access to the current directory and wrap bo...
Definition: ApplicationData.h:39
friend AssetTest
Definition: Asset.h:41
void load(const std::string &fileName, const SurgSim::Framework::ApplicationData &data)
Load a file with given name using 'data' as look up path(s).
Definition: Asset.cpp:42
std::string getFileName() const
Return the name of file loaded by this class.
Definition: Asset.cpp:58
virtual bool doLoad(const std::string &filePath)=0
Derived classes will overwrite this method to do actual loading.
Asset()
Constructor.
Definition: Asset.cpp:28
std::string m_fileName
Name of the file to be loaded.
Definition: Asset.h:87
virtual ~Asset()
Destructor.
Definition: Asset.cpp:38
Mixin class for enabling a property system on OSS classes, the instance still needs to initialize pro...
Definition: Accessible.h:37
virtual std::string getClassName() const =0
Support serialization with a classname.
CRTP Base class to implement Object Factory functionality on a base class, use this rather than writi...
Definition: ObjectFactory.h:122