Public Types | Public Member Functions

gnash::FunctionArgs< T > Class Template Reference

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

#include <fn_call.h>

List of all members.

Public Types

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

Public Member Functions

 FunctionArgs ()
 FunctionArgs (const FunctionArgs &other)
 The copy constructor copies all the arguments.
FunctionArgsoperator+= (const T &t)
FunctionArgsoperator, (const T &t)
void setReachable () const
 Mark any reachable resources.
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

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

Constructor & Destructor Documentation

template<typename T>
gnash::FunctionArgs< T >::FunctionArgs (  )  [inline]
template<typename T>
gnash::FunctionArgs< T >::FunctionArgs ( const FunctionArgs< T > &  other  )  [inline]

The copy constructor copies all the arguments.


Member Function Documentation

template<typename T>
FunctionArgs& gnash::FunctionArgs< T >::operator+= ( const T &  t  )  [inline]
template<typename T>
FunctionArgs& gnash::FunctionArgs< T >::operator, ( const T &  t  )  [inline]
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::for_each(), and gnash::as_value::setReachable().

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

template<typename T>
size_type gnash::FunctionArgs< T >::size (  )  const [inline]
template<typename T>
void gnash::FunctionArgs< T >::swap ( std::vector< T > &  to  )  [inline]

Referenced by gnash::fn_call::fn_call().


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