asio 0.1.5 Main Page | Class Index | Member Index | Tutorial

flag Class Template Reference

Helper template for implementing flag-based options. More...

List of all members.

Public Member Functions

 flag ()
 Default constructor.

 flag (bool enabled)
 Construct to be either enabled or disabled.

int level () const
 Get the level of the socket option.

int name () const
 Get the name of the socket option.

void set (bool enabled)
 Set the value of the flag.

bool get () const
 Get the current value of the flag.

void * data ()
 Get the address of the flag data.

const void * data () const
 Get the address of the flag data.

size_t size () const
 Get the size of the flag data.


Private Attributes

int value_
 The underlying value of the flag.


Detailed Description

template<int Level, int Name>
class asio::socket_option::flag< Level, Name >

Helper template for implementing flag-based options.


Constructor & Destructor Documentation

flag  ) 
 

Default constructor.

flag bool  enabled  ) 
 

Construct to be either enabled or disabled.


Member Function Documentation

int level  )  const
 

Get the level of the socket option.

int name  )  const
 

Get the name of the socket option.

void set bool  enabled  ) 
 

Set the value of the flag.

bool get  )  const
 

Get the current value of the flag.

void* data  ) 
 

Get the address of the flag data.

const void* data  )  const
 

Get the address of the flag data.

size_t size  )  const
 

Get the size of the flag data.


Member Data Documentation

int value_ [private]
 

The underlying value of the flag.