Gnash  0.8.11dev
Public Types | Public Member Functions | List of all members
gnash::FunctionArgs< T > Class Template Reference

A class to contain transferable arguments for a fn_call. More...

#include <as_function.h>

Public Types

typedef std::vector< T >::size_type size_type
 
typedef std::vector< T > container_type
 
typedef T value_type
 

Public Member Functions

 FunctionArgs ()=default
 
 FunctionArgs (FunctionArgs &&other)=default
 
 FunctionArgs (const FunctionArgs &other)=default
 The copy constructor copies all the arguments. More...
 
FunctionArgsoperator+= (T t)
 
FunctionArgsoperator, (T t)
 
template<typename U >
FunctionArgsoperator, (U &&u)
 
template<typename U >
FunctionArgsoperator+= (U &&u)
 
void setReachable () const
 Mark any reachable resources. More...
 
void swap (std::vector< T > &to)
 
size_type size () const
 

Detailed Description

template<typename T>
class gnash::FunctionArgs< T >

A class to contain transferable arguments for a fn_call.

The operators += and , are implemented for intuitive syntax: FunctionArgs<as_value> args; args += 0.0, "string", NaN. This may have unexpected side effects if it is used in unexpected ways, so stick to using such lists, or use operator += repeatedly. The arguments can be moved to another container, and this happens when the FunctionArgs object is passed to fn_call. It will still be valid afterwards, but will contain no arguments.

Member Typedef Documentation

§ container_type

template<typename T>
typedef std::vector<T> gnash::FunctionArgs< T >::container_type

§ size_type

template<typename T>
typedef std::vector<T>::size_type gnash::FunctionArgs< T >::size_type

§ value_type

template<typename T>
typedef T gnash::FunctionArgs< T >::value_type

Constructor & Destructor Documentation

§ FunctionArgs() [1/3]

template<typename T>
gnash::FunctionArgs< T >::FunctionArgs ( )
default

§ FunctionArgs() [2/3]

template<typename T>
gnash::FunctionArgs< T >::FunctionArgs ( FunctionArgs< T > &&  other)
default

§ FunctionArgs() [3/3]

template<typename T>
gnash::FunctionArgs< T >::FunctionArgs ( const FunctionArgs< T > &  other)
default

The copy constructor copies all the arguments.

Member Function Documentation

§ operator+=() [1/2]

template<typename T>
FunctionArgs& gnash::FunctionArgs< T >::operator+= ( t)
inline

§ operator+=() [2/2]

template<typename T>
template<typename U >
FunctionArgs& gnash::FunctionArgs< T >::operator+= ( U &&  u)
inline

References gnash::key::u.

§ operator,() [1/2]

template<typename T>
FunctionArgs& gnash::FunctionArgs< T >::operator, ( t)
inline

§ operator,() [2/2]

template<typename T>
template<typename U >
FunctionArgs& gnash::FunctionArgs< T >::operator, ( U &&  u)
inline

References gnash::key::u.

§ setReachable()

template<typename T>
void gnash::FunctionArgs< T >::setReachable ( ) const
inline

Mark any reachable resources.

This is only for cases where the lifetime of a FunctionArgs object extends beyond a function call.

References gnash::renderer::opengl::for_each(), and gnash::as_value::setReachable().

Referenced by gnash::Timer::markReachableResources().

§ size()

template<typename T>
size_type gnash::FunctionArgs< T >::size ( ) const
inline

§ swap()

template<typename T>
void gnash::FunctionArgs< T >::swap ( std::vector< T > &  to)
inline

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