Back to index

salome-kernel  6.5.0
Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes
DSC_BASIC_EXPORT Protocol Reference

#include <DSC_Callbacks.hxx>

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

List of all members.

Public Member Functions

 DSC_Callbacks ()
virtual ~DSC_Callbacks ()
virtual void provides_port_changed (const char *provides_port_name, int connection_nbr, const Engines::DSC::Message message)=0
 This method is used by the component when the number of connection on a provides port changes.
virtual void uses_port_changed (const char *uses_port_name, Engines::DSC::uses_port *new_uses_port, const Engines::DSC::Message message)=0
 This method is used by the component when the number of connection on a uses port changes.
 Engines_DSC_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, PortableServer::ObjectId *contId, const char *instanceName, const char *interfaceName, bool notif=false)
 Engines_DSC_i (CORBA::ORB_ptr orb, PortableServer::POA_ptr poa, Engines::Container_ptr container, const char *instanceName, const char *interfaceName, bool notif=false, bool regist=true)
virtual ~Engines_DSC_i ()
virtual void add_provides_port (Ports::Port_ptr ref, const char *provides_port_name, Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::NilPort, Engines::DSC::BadProperty)
virtual void add_uses_port (const char *repository_id, const char *uses_port_name, Ports::PortProperties_ptr port_prop) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::BadProperty)
virtual Ports::Port_ptr get_provides_port (const char *provides_port_name, const CORBA::Boolean connection_error) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected)
virtual Engines::DSC::uses_portget_uses_port (const char *uses_port_name) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected)
virtual void connect_provides_port (const char *provides_port_name) throw (Engines::DSC::PortNotDefined)
virtual void connect_uses_port (const char *uses_port_name, Ports::Port_ptr provides_port_ref) throw (Engines::DSC::PortNotDefined, Engines::DSC::BadPortType, Engines::DSC::NilPort)
virtual CORBA::Boolean is_connected (const char *port_name) throw (Engines::DSC::PortNotDefined)
virtual void disconnect_provides_port (const char *provides_port_name, const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected)
virtual void disconnect_uses_port (const char *uses_port_name, Ports::Port_ptr provides_port_ref, const Engines::DSC::Message message) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected, Engines::DSC::BadPortReference)
virtual Ports::PortProperties_ptr get_port_properties (const char *port_name) throw (Engines::DSC::PortNotDefined)
 PortProperties_i ()
virtual ~PortProperties_i ()
virtual void set_property (const char *name, const CORBA::Any &value) throw (Ports::NotDefined, Ports::BadType)
 CORBA method : set a value to a property.
virtual CORBA::Any * get_property (const char *name) throw (Ports::NotDefined)
 CORBA method : get the value of a property.

Static Public Member Functions

static void writeEvent (const char *request, const std::string &containerName, const char *instance_name, const char *port_name, const char *error, const char *message)
 Write a record in the trace file.

Protected Types

enum  port_type { uses, provides, none }
typedef std::map< std::string,
port_t * > 
ports

Protected Attributes

ports my_ports
ports::iterator my_ports_it

Detailed Description

Definition at line 41 of file DSC_Callbacks.hxx.


Member Typedef Documentation

typedef std::map<std::string, port_t *> Engines_DSC_interface::ports [protected, inherited]

Definition at line 176 of file DSC_interface.hxx.


Member Enumeration Documentation

enum Engines_DSC_interface::port_type [protected, inherited]
Enumerator:
uses 
provides 
none 

Definition at line 160 of file DSC_interface.hxx.


Constructor & Destructor Documentation

virtual DSC_BASIC_EXPORT::~DSC_Callbacks ( ) [inline, virtual]

Definition at line 45 of file DSC_Callbacks.hxx.

{}
virtual DSC_BASIC_EXPORT::~Engines_DSC_i ( ) [virtual]
virtual DSC_BASIC_EXPORT::~PortProperties_i ( ) [virtual]

Member Function Documentation

virtual void DSC_BASIC_EXPORT::add_provides_port ( Ports::Port_ptr  ref,
const char *  provides_port_name,
Ports::PortProperties_ptr  port_prop 
) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::NilPort, Engines::DSC::BadProperty) [inline, virtual]
See also:
Engines::DSC::add_provides_port

Reimplemented from Engines_DSC_interface.

Definition at line 73 of file DSC_i.hxx.

                                  {
      Engines_DSC_interface::add_provides_port(ref, 
                                               provides_port_name,
                                               port_prop);
    }
virtual void DSC_BASIC_EXPORT::add_uses_port ( const char *  repository_id,
const char *  uses_port_name,
Ports::PortProperties_ptr  port_prop 
) throw (Engines::DSC::PortAlreadyDefined, Engines::DSC::BadProperty) [inline, virtual]
See also:
Engines::DSC::add_uses_port

Reimplemented from Engines_DSC_interface.

Definition at line 87 of file DSC_i.hxx.

                                  {
      Engines_DSC_interface::add_uses_port(repository_id, 
                                           uses_port_name,
                                           port_prop);
    }
virtual void DSC_BASIC_EXPORT::connect_provides_port ( const char *  provides_port_name) throw (Engines::DSC::PortNotDefined) [inline, virtual]
See also:
Engines::DSC::connect_provides_port

Reimplemented from Engines_DSC_interface.

Definition at line 120 of file DSC_i.hxx.

virtual void DSC_BASIC_EXPORT::connect_uses_port ( const char *  uses_port_name,
Ports::Port_ptr  provides_port_ref 
) throw (Engines::DSC::PortNotDefined, Engines::DSC::BadPortType, Engines::DSC::NilPort) [inline, virtual]
See also:
Engines::DSC::connect_uses_port

Reimplemented from Engines_DSC_interface.

Definition at line 128 of file DSC_i.hxx.

                            {
    Engines_DSC_interface::connect_uses_port(uses_port_name,
                                             provides_port_ref);
  }
virtual void DSC_BASIC_EXPORT::disconnect_provides_port ( const char *  provides_port_name,
const Engines::DSC::Message  message 
) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) [inline, virtual]
See also:
Engines::DSC::disconnect_provides_port

Reimplemented from Engines_DSC_interface.

Definition at line 148 of file DSC_i.hxx.

                                       {
      Engines_DSC_interface::disconnect_provides_port(provides_port_name,
                                                      message);
    }
virtual void DSC_BASIC_EXPORT::disconnect_uses_port ( const char *  uses_port_name,
Ports::Port_ptr  provides_port_ref,
const Engines::DSC::Message  message 
) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected, Engines::DSC::BadPortReference) [inline, virtual]
See also:
Engines::DSC::disconnect_uses_port

Reimplemented from Engines_DSC_interface.

Definition at line 159 of file DSC_i.hxx.

                                       {
      Engines_DSC_interface::disconnect_uses_port(uses_port_name,
                                                  provides_port_ref,
                                                  message);
    }

Definition at line 44 of file DSC_Callbacks.hxx.

{}
DSC_BASIC_EXPORT::Engines_DSC_i ( CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
PortableServer::ObjectId *  contId,
const char *  instanceName,
const char *  interfaceName,
bool  notif = false 
)
DSC_BASIC_EXPORT::Engines_DSC_i ( CORBA::ORB_ptr  orb,
PortableServer::POA_ptr  poa,
Engines::Container_ptr  container,
const char *  instanceName,
const char *  interfaceName,
bool  notif = false,
bool  regist = true 
)
virtual Ports::PortProperties_ptr DSC_BASIC_EXPORT::get_port_properties ( const char *  port_name) throw (Engines::DSC::PortNotDefined) [inline, virtual]
See also:
Engines::DSC::get_port_properties

Reimplemented from Engines_DSC_interface.

Definition at line 173 of file DSC_i.hxx.

virtual CORBA::Any* DSC_BASIC_EXPORT::get_property ( const char *  name) throw (Ports::NotDefined) [virtual]

CORBA method : get the value of a property.

See also:
Ports::PortProperties::get_property
virtual Ports::Port_ptr DSC_BASIC_EXPORT::get_provides_port ( const char *  provides_port_name,
const CORBA::Boolean  connection_error 
) throw (Engines::DSC::PortNotDefined, Engines::DSC::PortNotConnected) [inline, virtual]
See also:
Engines::DSC::get_provides_port

Reimplemented from Engines_DSC_interface.

Definition at line 100 of file DSC_i.hxx.

                                       {
      return Engines_DSC_interface::get_provides_port(provides_port_name,
                                                      connection_error);
    }
See also:
Engines::DSC::get_uses_port

Reimplemented from Engines_DSC_interface.

Definition at line 111 of file DSC_i.hxx.

                                       {
      return Engines_DSC_interface::get_uses_port(uses_port_name);
    }
virtual CORBA::Boolean DSC_BASIC_EXPORT::is_connected ( const char *  port_name) throw (Engines::DSC::PortNotDefined) [inline, virtual]
See also:
Engines::DSC::is_connected

Reimplemented from Engines_DSC_interface.

Definition at line 140 of file DSC_i.hxx.

                                     {
      return Engines_DSC_interface::is_connected(port_name);
    }
virtual void DSC_BASIC_EXPORT::provides_port_changed ( const char *  provides_port_name,
int  connection_nbr,
const Engines::DSC::Message  message 
) [pure virtual]

This method is used by the component when the number of connection on a provides port changes.

This information helps the user code to detect operation on its ports.

Parameters:
provides_port_namethe name of the provides name that has changed.
connection_nbrthe new number of connection on the provides port.
messagecontains informations about the modification of the port.
virtual void DSC_BASIC_EXPORT::set_property ( const char *  name,
const CORBA::Any &  value 
) throw (Ports::NotDefined, Ports::BadType) [virtual]

CORBA method : set a value to a property.

See also:
Ports::PortProperties::set_property
virtual void DSC_BASIC_EXPORT::uses_port_changed ( const char *  uses_port_name,
Engines::DSC::uses_port new_uses_port,
const Engines::DSC::Message  message 
) [pure virtual]

This method is used by the component when the number of connection on a uses port changes.

This information helps the user code to detect operation on its ports.

Parameters:
uses_port_namethe name of the uses name that has changed.
new_uses_portthe new sequence representing the uses port.
messagecontains informations about the modification of the port.
void Engines_DSC_interface::writeEvent ( const char *  request,
const std::string &  containerName,
const char *  instance_name,
const char *  port_name,
const char *  error,
const char *  message 
) [static, inherited]

Write a record in the trace file.

Parameters:
requestthe name of the request executed
containerNamethe name of the container where the request is executed
instance_namethe name of the component where the request is executed
port_namethe name of the port that is concerned
errorif an error has occured, a string that identifies the error
messageinformations about error or about the request

Definition at line 499 of file DSC_interface.cxx.

{
  if(traceLevel < 0)
    initTrace(containerName);
  if(traceLevel == 0)return;

#ifdef WNT
#else
  struct timeval tv;
  gettimeofday(&tv,0);
  long tt0=tv.tv_sec/3600; //hours

  if(traceType == 2)
    {
      //notifier (not used: salome notifier is now obsolete)
      std::ostringstream msg;
      msg.width(7);
      msg << tt0 ;
      msg << ":" ;
      long tt1=(tv.tv_sec-3600*tt0)/60;//minutes
      msg.width(2);
      msg << tt1 ;
      msg << ":" ;
      long tt2=tv.tv_sec - 3600*tt0-60*tt1; //seconds
      msg.width(2);
      msg << tt2 ;
      msg << ":" ;
      long tt3=tv.tv_usec/1000; //milliseconds
      msg.width(3);
      msg << tt3 ;
      msg << " | " ;
      msg.width(24);
      msg << error;
      msg << " | " ;
      msg << message ;
      //send event to notifier (containerName.c_str(),instance_name, request, msg.str().c_str())
    }
  else
    {
      //cerr or file
      out->width(7);
      *out << tt0 ;
      *out << ":" ;
      long tt1=(tv.tv_sec-3600*tt0)/60;//minutes
      out->width(2);
      *out << tt1 ;
      *out << ":" ;
      long tt2=tv.tv_sec - 3600*tt0-60*tt1; //seconds
      out->width(2);
      *out << tt2 ;
      *out << ":" ;
      long tt3=tv.tv_usec/1000; //milliseconds
      out->width(3);
      *out << tt3 ;
      *out << " | " ;
      out->width(16);
      *out << request ;
      *out << " | " ;
      out->width(16);
      *out << containerName ;
      *out << " | " ;
      out->width(16);
      *out << instance_name ;
      *out << " | " ;
      out->width(16);
      *out << port_name ;
      *out << " | " ;
      out->width(24);
      *out << error;
      *out << " | " ;
      *out << message ;
      *out << std::endl;
    }
#endif
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ports Engines_DSC_interface::my_ports [protected, inherited]

Definition at line 181 of file DSC_interface.hxx.

ports::iterator Engines_DSC_interface::my_ports_it [protected, inherited]

Definition at line 182 of file DSC_interface.hxx.


The documentation for this protocol was generated from the following files: