Gnash  0.8.10
Public Types | Public Member Functions
gnash::FunctionArgs Class 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

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

typedef std::vector<T> gnash::FunctionArgs::container_type
typedef std::vector<T>::size_type gnash::FunctionArgs::size_type

Constructor & Destructor Documentation

gnash::FunctionArgs::FunctionArgs ( ) [inline]
gnash::FunctionArgs::FunctionArgs ( const FunctionArgs other) [inline]

The copy constructor copies all the arguments.


Member Function Documentation

FunctionArgs& gnash::FunctionArgs::operator+= ( const T &  t) [inline]
FunctionArgs& gnash::FunctionArgs::operator, ( const T &  t) [inline]
void gnash::FunctionArgs::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_type gnash::FunctionArgs::size ( ) const [inline]
void gnash::FunctionArgs::swap ( std::vector< T > &  to) [inline]

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


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