Public Member Functions | Protected Member Functions

TAO_AV_Endpoint_Process_Strategy_A Class Reference

Process-based strategy to create "A" type endpoints. More...

#include <Endpoint_Strategy.h>

Inheritance diagram for TAO_AV_Endpoint_Process_Strategy_A:
Inheritance graph
[legend]
Collaboration diagram for TAO_AV_Endpoint_Process_Strategy_A:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_AV_Endpoint_Process_Strategy_A (ACE_Process_Options *process_options)
 Constructor.
virtual ~TAO_AV_Endpoint_Process_Strategy_A (void)
 Destructor.

Protected Member Functions

virtual int create_A (AVStreams::StreamEndPoint_A_ptr &stream_endpoint, AVStreams::VDev_ptr &vdev)
 Creates an "A" type stream endpoint, and a vdev.
virtual int get_stream_endpoint (void)
 Gets the "A" type stream endpoint from the child process.

Detailed Description

Process-based strategy to create "A" type endpoints.

Definition at line 127 of file Endpoint_Strategy.h.


Constructor & Destructor Documentation

TAO_AV_Endpoint_Process_Strategy_A::TAO_AV_Endpoint_Process_Strategy_A ( ACE_Process_Options process_options  ) 

Constructor.

Definition at line 243 of file Endpoint_Strategy.cpp.

  : TAO_AV_Endpoint_Process_Strategy (process_options)
{
}

TAO_AV_Endpoint_Process_Strategy_A::~TAO_AV_Endpoint_Process_Strategy_A ( void   )  [virtual]

Destructor.

Definition at line 249 of file Endpoint_Strategy.cpp.

{
}


Member Function Documentation

int TAO_AV_Endpoint_Process_Strategy_A::create_A ( AVStreams::StreamEndPoint_A_ptr &  stream_endpoint,
AVStreams::VDev_ptr &  vdev 
) [protected, virtual]

Creates an "A" type stream endpoint, and a vdev.

Reimplemented from TAO_AV_Endpoint_Strategy.

Definition at line 255 of file Endpoint_Strategy.cpp.

{
  // use the baseclass activate
  if (this->activate () == -1)
    ACE_ERROR_RETURN ((LM_ERROR,
                       "(%P|%t) TAO_AV_Endpoint_Process_Strategy: Error in activate ()\n"),
                      -1);

  // return the object references
  stream_endpoint = AVStreams::StreamEndPoint_A::_duplicate( this->stream_endpoint_a_.in() );
  vdev = AVStreams::VDev::_duplicate( this->vdev_.in() );
  return 0;

}

int TAO_AV_Endpoint_Process_Strategy_A::get_stream_endpoint ( void   )  [protected, virtual]

Gets the "A" type stream endpoint from the child process.

Implements TAO_AV_Endpoint_Process_Strategy.

Definition at line 273 of file Endpoint_Strategy.cpp.

{
  try
    {
      char stream_endpoint_name[BUFSIZ];
      ACE_OS::sprintf (stream_endpoint_name,
                       "%s:%s:%ld",
                       "Stream_Endpoint_A",
                       this->host_,
                       (long) this->pid_);

      if (TAO_debug_level > 0) ACE_DEBUG ((LM_DEBUG,"(%P|%t)%s\n",stream_endpoint_name));

      // Create the name
      CosNaming::Name Stream_Endpoint_A_Name (1);

      Stream_Endpoint_A_Name.length (1);
      Stream_Endpoint_A_Name [0].id = CORBA::string_dup (stream_endpoint_name);

      // Get the CORBA::Object
      CORBA::Object_var stream_endpoint_a =
        this->naming_context_->resolve (Stream_Endpoint_A_Name);

      // Narrow the reference
      this->stream_endpoint_a_ =
        AVStreams::StreamEndPoint_A::_narrow (stream_endpoint_a.in ());

      // Check for validity
      if (CORBA::is_nil (this->stream_endpoint_a_.in() ))
        ACE_ERROR_RETURN ((LM_ERROR,
                           " could not resolve Stream_Endpoint_A in Naming service <%s>\n"),
                          -1);
    }
  catch (const CORBA::Exception& ex)
    {
      ex._tao_print_exception (
        "TAO_AV_Endpoint_Process_Strategy_A::get_stream_endpoint");
      return -1;
    }
  return 0;
}


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines