37 #ifndef AIMS_MESH_TEXTURE_H 
   38 #define AIMS_MESH_TEXTURE_H 
   52 template < 
class T = 
float > 
class Texture;
 
   81   const std::vector<T> & 
data()
 const { 
return( 
_data ); }
 
   88   std::ostream& operator << <>( std::ostream& out, 
 
   97 template < 
class T > 
inline 
  100   out << 
"{nItem=" << thing.
nItem() << 
", data=(";
 
  101   for ( 
size_t n = 0; n < thing.
nItem(); n++ )
 
  102     out << thing.
item( n ) << 
", ";
 
  120                     public std::map< int, Texture< T > >
 
  129       std::map< int, 
Texture< T > >() 
 
  131       for( 
int i=0; i<ntimes; ++i )
 
  135       std::map< int, 
Texture< T > >()
 
  137       for( 
int i=0; i<ntimes; ++i )
 
  153     T& 
item( 
int n ) { 
return (*
this)[0].item( n ); }
 
  155     void reserve( 
size_t size ) { (*this)[0].reserve( size ); }
 
  164       for( 
int i=0; i<
nItem(); ++i )
 
  165         if( 
item(i) != x.
item(i) ) 
return false;
 
  170     std::ostream& operator << <>( std::ostream& out, 
 
  180 #ifndef DOXYGEN_HIDE_INTERNAL_CLASSES 
  189     { 
return "Texture"; }
 
  203 template < 
class T > 
inline 
  207   for ( it = this->begin(); it != this->end(); it++ )
 
  208     (it->second).erase();
 
  209   std::map< int, Texture< T > >::erase( this->begin(), this->end() );
 
  213 template < 
class T > 
inline 
  220   for ( it = thing.begin(); it != thing.end(); it++ )
 
  223     out << 
"t=" << (*it).first << 
",";
 
  224     out << (*it).second << 
"},";
 
  227   return out << 
"NULL}" << std::flush;
 
  251 #define _TMP_ TimeTexture< AimsVector< short, 2 > > 
  266 #define _TMP_ rc_ptr< TimeTexture< AimsVector< short, 2 > > > 
bool operator==(const Texture< T > &x) const
std::vector< T > & data()
Texture(size_t n, const T &value)
void reserve(size_t size)
const T & operator[](int n) const
const std::vector< T > & data() const
const T & item(int n) const
size_t size() const
alias for nItem()
void push_back(const T &item)
const aims::PythonHeader & header() const
Get the header.
void reserve(size_t size)
TimeTexture(int ntimes, size_t nitems, const T &value)
std::map< int, Texture< T > >::iterator iterator
aims::PythonHeader _header
Header.
void push_back(const T &item)
TimeTexture(int ntimes, size_t nitems)
const T & item(int n) const
bool operator==(const TimeTexture< T > &x) const
void setHeader(const aims::PythonHeader &hdr)
Set the header.
aims::PythonHeader & header()
std::map< int, Texture< T > >::const_iterator const_iterator
static std::string dataType()
static std::string name()
static std::string objectType()
#define DECLARE_GENERIC_OBJECT_TYPE(T)
AIMSDATA_API TimeTexture< Point2df > Texture2d
AIMSDATA_API std::ostream & operator<<(std::ostream &out, const Texture< T > &thing)
AIMSDATA_API TimeTexture< float > Texture1d