7 #ifndef __FWDATA_LOCATION_SINGLEFILE_HPP__ 8 #define __FWDATA_LOCATION_SINGLEFILE_HPP__ 10 #include "fwData/config.hpp" 11 #include "fwData/factory/new.hpp" 12 #include "fwData/location/ILocation.hpp" 14 #include <boost/filesystem.hpp> 16 fwCampAutoDeclareDataMacro((
fwData)(location)(SingleFile), FWDATA_API);
30 ((::fwData::factory::New< SingleFile >, () ))
31 ((SingleFileFactory, ((::boost::filesystem::path)) ))
43 FWDATA_API
void shallowCopy(
const Object::csptr& _source )
override;
46 FWDATA_API
void cachedDeepCopy(
const Object::csptr& _source, DeepCopyCacheType& cache)
override;
49 FWDATA_API
void setPath( PathType path);
52 FWDATA_API PathType getPath()
const;
56 FWDATA_API
static sptr SingleFileFactory(PathType path);
85 getLocation<SingleFile>(m_rw)->setPath(path);
91 return (getLocation<SingleFile>(m_rw))->getPath();
#define fwCoreClassDefinitionsWithNFactoriesMacro(_classinfo_, _factories_args_)
Generate common construction methods for classes with several factories.
This class defines a single file location.
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
void setFile(ILocation::PathType path)
Set file system path.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
This class is derived by reader/writer.
enableSingleFile(RW *rw)
constructor
Abstract class to define a location ( fileSystem, directory(IES) etc.... )
PathType m_path
file system path
ILocation::PathType getFile()
Get file system path.
Contains the representation of the data objects used in the framework.