7 #ifndef __FWDATA_LOCATION_FOLDER_HPP__ 8 #define __FWDATA_LOCATION_FOLDER_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)(Folder), FWDATA_API);
31 ((::fwData::factory::New< Folder >, () ))
32 ((FolderFactory, ((::boost::filesystem::path))((
bool)(
false)) ))
41 FWDATA_API
virtual ~
Folder();
44 FWDATA_API
void shallowCopy(
const Object::csptr& _source )
override;
47 FWDATA_API
void cachedDeepCopy(
const Object::csptr& _source, DeepCopyCacheType& cache)
override;
50 FWDATA_API
void setFolder( PathType folder);
53 FWDATA_API PathType getFolder()
const;
56 FWDATA_API
void setRecursive(
bool recursive);
59 FWDATA_API
bool getRecursive();
63 FWDATA_API
static sptr FolderFactory(PathType path,
bool recursive =
false );
95 getLocation<Folder>(m_rw)->setFolder(folder);
101 return getLocation<Folder>(m_rw)->getFolder();
107 getLocation<Folder>(m_rw)->setRecursive(val);
113 return getLocation<Folder>(m_rw)->getRecursive();
This class defines a folder location.
bool getRecursive()
Get the flag if folder location is recursive.
ILocation::PathType getFolder()
Get folder filesystem path.
#define fwCoreClassDefinitionsWithNFactoriesMacro(_classinfo_, _factories_args_)
Generate common construction methods for classes with several factories.
PathType m_folder
Folder path
Key class used to restrict access to Object construction. See http://www.drdobbs.com/184402053.
enableFolder(RW *rw)
constructor
void setFolder(ILocation::PathType folder)
Set folder filesystem path.
void setRecursive(bool val)
Set the flag if folder location is recursive.
#define SLM_ASSERT(message, cond)
work like 'assert' from 'cassert', with in addition a message logged by spylog (with FATAL loglevel) ...
Abstract class to define a location ( fileSystem, directory(IES) etc.... )
bool m_isRecursive
Flag if folder is recursive.
This class is derived by reader/writer.
Contains the representation of the data objects used in the framework.