Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
double_conversion::Vector< T > Class Template Reference

#include <utils.h>

Public Member Functions

 Vector ()
 
 Vector (T *data, int len)
 
Vector< TSubVector (int from, int to)
 
int length () const
 
bool is_empty () const
 
Tstart () const
 
Toperator[] (int index) const
 
Tfirst ()
 
Tlast ()
 
void pop_back ()
 

Detailed Description

template<typename T>
class double_conversion::Vector< T >

Definition at line 249 of file utils.h.

Constructor & Destructor Documentation

◆ Vector() [1/2]

template<typename T >
double_conversion::Vector< T >::Vector ( )
inline

Definition at line 251 of file utils.h.

251: start_(DOUBLE_CONVERSION_NULLPTR), length_(0) {}
#define DOUBLE_CONVERSION_NULLPTR
Definition: utils.h:41

◆ Vector() [2/2]

template<typename T >
double_conversion::Vector< T >::Vector ( T data,
int  len 
)
inline

Definition at line 252 of file utils.h.

252 : start_(data), length_(len) {
254 }
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63
#define DOUBLE_CONVERSION_ASSERT(condition)
Definition: utils.h:46

Member Function Documentation

◆ first()

template<typename T >
T & double_conversion::Vector< T >::first ( )
inline

Definition at line 280 of file utils.h.

280{ return start_[0]; }

◆ is_empty()

template<typename T >
bool double_conversion::Vector< T >::is_empty ( ) const
inline

Definition at line 269 of file utils.h.

269{ return length_ == 0; }

◆ last()

template<typename T >
T & double_conversion::Vector< T >::last ( )
inline

Definition at line 282 of file utils.h.

282{ return start_[length_ - 1]; }

◆ length()

template<typename T >
int double_conversion::Vector< T >::length ( ) const
inline

Definition at line 266 of file utils.h.

266{ return length_; }

◆ operator[]()

template<typename T >
T & double_conversion::Vector< T >::operator[] ( int  index) const
inline

Definition at line 275 of file utils.h.

275 {
276 DOUBLE_CONVERSION_ASSERT(0 <= index && index < length_);
277 return start_[index];
278 }

◆ pop_back()

template<typename T >
void double_conversion::Vector< T >::pop_back ( )
inline

Definition at line 284 of file utils.h.

284 {
286 --length_;
287 }
bool is_empty() const
Definition: utils.h:269

◆ start()

template<typename T >
T * double_conversion::Vector< T >::start ( ) const
inline

Definition at line 272 of file utils.h.

272{ return start_; }

◆ SubVector()

template<typename T >
Vector< T > double_conversion::Vector< T >::SubVector ( int  from,
int  to 
)
inline

Definition at line 258 of file utils.h.

258 {
259 DOUBLE_CONVERSION_ASSERT(to <= length_);
260 DOUBLE_CONVERSION_ASSERT(from < to);
261 DOUBLE_CONVERSION_ASSERT(0 <= from);
262 return Vector<T>(start() + from, to - from);
263 }
T * start() const
Definition: utils.h:272

The documentation for this class was generated from the following file: