34 #ifndef AIMS_IO_AIMSGRAPHW_D_H
35 #define AIMS_IO_AIMSGRAPHW_D_H
76 : colors( new std::map<std::string,std::vector<int> > )
83 std::map<std::string,AimsGraphWriter::Wrapper *>::iterator i, e
93 template<
typename T>
bool
96 return wp.write( *data );
100 template<
typename T>
int
101 AimsGraphWriter::ObjectWrapper<T>::freeindex()
const
103 typename T::const_iterator i = data->begin(), e = data->end();
105 if( i != e && i->first == 0 )
107 for ( ; i!=e && i->first==n; ++i, ++n ) {}
112 template<
typename T> std::string
115 return ::carto::DataTypeCode<T>().objectType();
119 template<
typename T> std::string
126 template <
typename T>
148 bool AimsGraphWriter::write(
const T & obj )
const
157 == std::string::npos )
163 return w.write( obj );
177 glob =
new ObjectWrapper<T>( gobject.
get() );
180 glob =
new ObjectWrapper<T>(
new T );
181 T* data = ((ObjectWrapper<T> *) glob)->data;
217 catch( std::exception & e )
219 std::cerr << e.what() << std::endl;
static bool defaultTakeObject(Process &, const std::string &, Finder &)
static bool isEmpty(const T &obj)
Generic finder / checker for all data objects and file formats This will replace the old AimsFinder.
Link mechanism between the Finder and a process operating on arbitrary data types.
static std::string dirname(const std::string &)
static std::string fileStat(const std::string &)
void insertElement(T &dest, int index, const T &src)
insert a sub-element in a container data (time bucket/mesh/texture, or volume of labels....
void adjustVoxelSize(T &, const T &)
utility function to copy voxel sizes from an object to another (if applicable)
void setHeaderInfo(T &obj, const carto::GenericObject &srcheader)
The class for EcatSino data write operation.
carto::AttributedObject * element
virtual std::string objectType() const
virtual std::string dataType() const
GraphElementCode elemcode
AimsGraphWriter::SavingMode mode
~AimsGraphWriter_Private()
AimsGraphWriter::SavingMode newmode
std::map< std::string, AimsGraphWriter::Wrapper * > globalobjects
AimsGraphWriter::SavingMode oldmode
std::map< std::string, bool > globalmodified
AimsGraphWriter_Private()
carto::rc_ptr< std::map< std::string, std::vector< int > > > colors
AimsGraphWriter::SavingMode prevmode
Describe how Aims objects are stored in graph objects.
std::string global_filename
std::string global_attribute