TAO_ECG_Mcast_Gateway::Attributes Struct Reference

Helper class to initialize a TAO_ECG_Mcast_Gateway. More...

#include <ECG_Mcast_Gateway.h>

List of all members.

Public Member Functions

 Attributes (void)

Public Attributes

Address_Server_Type address_server_type
Handler_Type handler_type
Service_Type service_type
u_char ttl_value
ACE_CString nic
int ip_multicast_loop
int non_blocking


Detailed Description

Helper class to initialize a TAO_ECG_Mcast_Gateway.

The TAO_ECG_Mcast_Gateway class has several properties that can be configured at initialization time, with default values. The canonical trick of using a constructor or init() method with multiple arguments does not work because to change the last argument the application developer needs to know all the other defaults.

Instead we define a helper class that initializes all the fields to reasonable defaults. The application only sets the fields that it is interested into, if new fields are added applications do not need to change.

With a little trickery we can even eliminate named temporaries:

TAO_ECG_Mcast_Gateway gw;
gw.init(TAO_ECG_Mcast_Gateway::Attributes().set_foo(x).set_bar(y));

but we are not implementing that one (detecting errors is too hard without exceptions and ACE+TAO are somewhat shy of exceptions at this point.)

Definition at line 187 of file ECG_Mcast_Gateway.h.


Constructor & Destructor Documentation

ACE_INLINE TAO_ECG_Mcast_Gateway::Attributes::Attributes void   ) 
 

Definition at line 23 of file ECG_Mcast_Gateway.i.

References TAO_ECG_DEFAULT_ADDRESS_SERVER, TAO_ECG_DEFAULT_HANDLER, TAO_ECG_DEFAULT_IP_MULTICAST_LOOP, TAO_ECG_DEFAULT_NIC, TAO_ECG_DEFAULT_NON_BLOCKING, TAO_ECG_DEFAULT_SERVICE, and TAO_ECG_DEFAULT_TTL.

00024   : address_server_type (TAO_ECG_DEFAULT_ADDRESS_SERVER)
00025   , handler_type (TAO_ECG_DEFAULT_HANDLER)
00026   , service_type (TAO_ECG_DEFAULT_SERVICE)
00027   , ttl_value (TAO_ECG_DEFAULT_TTL)
00028   , nic (static_cast<const char *> (TAO_ECG_DEFAULT_NIC))
00029   , ip_multicast_loop (TAO_ECG_DEFAULT_IP_MULTICAST_LOOP)
00030   , non_blocking (TAO_ECG_DEFAULT_NON_BLOCKING)
00031 {
00032 }


Member Data Documentation

Address_Server_Type TAO_ECG_Mcast_Gateway::Attributes::address_server_type
 

Definition at line 191 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().

Handler_Type TAO_ECG_Mcast_Gateway::Attributes::handler_type
 

Definition at line 192 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().

int TAO_ECG_Mcast_Gateway::Attributes::ip_multicast_loop
 

Definition at line 196 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().

ACE_CString TAO_ECG_Mcast_Gateway::Attributes::nic
 

Definition at line 195 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().

int TAO_ECG_Mcast_Gateway::Attributes::non_blocking
 

Definition at line 197 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().

Service_Type TAO_ECG_Mcast_Gateway::Attributes::service_type
 

Definition at line 193 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().

u_char TAO_ECG_Mcast_Gateway::Attributes::ttl_value
 

Definition at line 194 of file ECG_Mcast_Gateway.h.

Referenced by TAO_ECG_Mcast_Gateway::init().


The documentation for this struct was generated from the following files:
Generated on Thu Nov 9 13:16:13 2006 for TAO_RTEvent by doxygen 1.3.6