37 #ifndef AIMS_MESH_TEXTURE_H 38 #define AIMS_MESH_TEXTURE_H 52 template <
class T =
float >
class Texture;
79 const std::vector<T> &
data()
const {
return(
_data ); }
85 std::ostream& operator << <>( std::ostream& out,
94 template <
class T >
inline 95 std::ostream& operator << ( std::ostream& out, const Texture< T >& thing )
97 out <<
"{nItem=" << thing.nItem() <<
", data=(";
98 for (
size_t n = 0; n < thing.nItem(); n++ )
99 out << thing.item( n ) <<
", ";
113 std::ostream& operator << ( std::ostream& out, const TimeTexture< T >& thing );
117 public std::map< int, Texture< T > >
128 for(
int i=0; i<ntimes; ++i )
134 for(
int i=0; i<ntimes; ++i )
150 T&
item(
int n ) {
return (*
this)[0].item( n ); }
152 void reserve(
size_t size ) { (*this)[0].reserve( size ); }
158 std::ostream& operator << <>( std::ostream& out,
168 #ifndef DOXYGEN_HIDE_INTERNAL_CLASSES 177 {
return "Texture"; }
188 #endif // DOXYGEN_HIDE_INTERNAL_CLASSES 191 template <
class T >
inline 195 for ( it = this->begin(); it != this->end(); it++ )
196 (it->second).erase();
197 std::map< int, Texture< T > >
::erase( this->begin(), this->end() );
201 template <
class T >
inline 202 std::ostream& operator << ( std::ostream& out, const TimeTexture< T >& thing )
208 for ( it = thing.begin(); it != thing.end(); it++ )
211 out <<
"t=" << (*it).first <<
",";
212 out << (*it).second <<
"},";
215 return out <<
"NULL}" << std::flush;
236 #define _TMP_ TimeTexture< AimsVector< short, 2 > > 248 #define _TMP_ rc_ptr< TimeTexture< AimsVector< short, 2 > > > #define DECLARE_GENERIC_OBJECT_TYPE(T)
TimeTexture(int ntimes, size_t nitems, const T &value)
std::map< int, Texture< T > >::iterator iterator
const T & operator[](int n) const
void push_back(const T &item)
std::map< int, Texture< T > >::const_iterator const_iterator
Texture(size_t n, const T &value)
TimeTexture(int ntimes, size_t nitems)
aims::PythonHeader _header
Header.
const T & item(int n) const
void reserve(size_t size)
static std::string objectType()
void reserve(size_t size)
static std::string dataType()
const T & item(int n) const
static std::string name()
std::vector< T > & data()
const std::vector< T > & data() const
AIMSDATA_API TimeTexture< Point2df > Texture2d
AIMSDATA_API std::ostream & operator<<(std::ostream &out, const Texture< T > &thing)
AIMSDATA_API TimeTexture< float > Texture1d
aims::PythonHeader & header()
void setHeader(const aims::PythonHeader &hdr)
Set the header.
void push_back(const T &item)
const aims::PythonHeader & header() const
Get the header.