Gnash  0.8.11dev
Public Types | Public Member Functions | List of all members
gnash::PropFlags Class Reference

Flags defining the level of protection of a member. More...

#include <PropFlags.h>

Public Types

enum  Flags {
  dontEnum = 1 << 0, dontDelete = 1 << 1, readOnly = 1 << 2, onlySWF6Up = 1 << 7,
  ignoreSWF6 = 1 << 8, onlySWF7Up = 1 << 10, onlySWF8Up = 1 << 12, onlySWF9Up = 1 << 13
}
 Actual flags. More...
 

Public Member Functions

 PropFlags ()
 Default constructor. More...
 
 PropFlags (const bool read_only, const bool dont_delete, const bool dont_enum)
 Constructor. More...
 
 PropFlags (std::uint16_t flags)
 Constructor, from numerical value. More...
 
bool operator== (const PropFlags &o) const
 
bool operator!= (const PropFlags &o) const
 
template<Flags f>
bool test () const
 
bool get_visible (int swfVersion) const
 Get version-based visibility. More...
 
void clear_visible (int swfVersion)
 
std::uint16_t get_flags () const
 accessor to the numerical flags value More...
 
bool set_flags (std::uint16_t setTrue, std::uint16_t setFalse=0)
 

Detailed Description

Flags defining the level of protection of a member.

Member Enumeration Documentation

◆ Flags

Actual flags.

Enumerator
dontEnum 

Protect from enumeration.

dontDelete 

Protect from deletion.

readOnly 

Protect from assigning a value.

onlySWF6Up 

Only visible by VM initialized for version 6 or higher.

ignoreSWF6 

Ignore in SWF6-initialized VM.

onlySWF7Up 

Only visible by VM initialized for version 7 or higher.

onlySWF8Up 

Only visible by VM initialized for version 8 or higher.

onlySWF9Up 

Only visible by VM initialized for version 9 or higher.

Constructor & Destructor Documentation

◆ PropFlags() [1/3]

gnash::PropFlags::PropFlags ( )
inline

Default constructor.

◆ PropFlags() [2/3]

gnash::PropFlags::PropFlags ( const bool  read_only,
const bool  dont_delete,
const bool  dont_enum 
)
inline

Constructor.

◆ PropFlags() [3/3]

gnash::PropFlags::PropFlags ( std::uint16_t  flags)
inline

Constructor, from numerical value.

Member Function Documentation

◆ clear_visible()

void gnash::PropFlags::clear_visible ( int  swfVersion)
inline

◆ get_flags()

std::uint16_t gnash::PropFlags::get_flags ( ) const
inline

accessor to the numerical flags value

◆ get_visible()

bool gnash::PropFlags::get_visible ( int  swfVersion) const
inline

Get version-based visibility.

Referenced by gnash::visible().

◆ operator!=()

bool gnash::PropFlags::operator!= ( const PropFlags o) const
inline

References gnash::key::o.

◆ operator==()

bool gnash::PropFlags::operator== ( const PropFlags o) const
inline

References gnash::key::o.

◆ set_flags()

bool gnash::PropFlags::set_flags ( std::uint16_t  setTrue,
std::uint16_t  setFalse = 0 
)
inline

set the numerical flags value (return the new value ) If unlocked is false, you cannot un-protect from over-write, you cannot un-protect from deletion and you cannot un-hide from the for..in loop construct

Parameters
setTruethe set of flags to set
setFalsethe set of flags to clear
Returns
true on success, false on failure (is protected)

◆ test()

template<Flags f>
bool gnash::PropFlags::test ( ) const
inline

References gnash::key::f.

Referenced by gnash::operator<<(), and gnash::readOnly().


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