diff options
Diffstat (limited to 'TAO/orbsvcs')
131 files changed, 2917 insertions, 2608 deletions
diff --git a/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.h b/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.h index 4154e64e5a7..a67b77541b7 100644 --- a/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.h +++ b/TAO/orbsvcs/Concurrency_Service/Concurrency_Service.h @@ -10,17 +10,22 @@ // // = DESCRIPTION // This class implements a subset of the functionality of the -// CORBA Concurrency Service. +// CORBA Concurrency Service. // // = AUTHORS // Torben Worm <tworm@cs.wustl.edu> // // ============================================================================ -#if !defined (_CONCURRENCY_SERVICE_H) +#ifndef _CONCURRENCY_SERVICE_H #define _CONCURRENCY_SERVICE_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Log_Msg.h" #include "tao/TAO.h" #include "orbsvcs/Concurrency/Concurrency_Utils.h" @@ -41,13 +46,13 @@ public: // Default Constructor. Concurrency_Service (int argc, - char **argv, + char **argv, CORBA::Environment &env); // Constructor taking the command-line arguments. ~Concurrency_Service (void); // Destructor. - + int init (int argc, char **argv, CORBA::Environment &env); diff --git a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h index e66ac7b848d..5289711965d 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h +++ b/TAO/orbsvcs/LifeCycle_Service/Criteria_Evaluator.h @@ -17,35 +17,35 @@ #include "orbsvcs/CosLifeCycleC.h" #include "orbsvcs/LifeCycleServiceC.h" -#if !defined (CRITERIA_EVALUATOR_H_H) +#ifndef CRITERIA_EVALUATOR_H_H #define CRITERIA_EVALUATOR_H_H class Criteria_Evaluator// : public LifeCycleService::Criteria_Evaluator { // = TITLE - // + // public: Criteria_Evaluator (const CosLifeCycle::Criteria & criteria); ~Criteria_Evaluator (); - + LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * getInitialization (CORBA::Environment &_tao_environment); char * getFilter (CORBA::Environment &_tao_environment); - LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * getLogicalLocation (CORBA::Environment &_tao_environment) + LifeCycleService::Criteria_Evaluator::SeqNamedValuePair * getLogicalLocation (CORBA::Environment &_tao_environment) { return 0; } - char * getPreferences (CORBA::Environment &_tao_environment) + char * getPreferences (CORBA::Environment &_tao_environment) { return 0; } private: CORBA::Any *getCriteriaMember (const CORBA::String member_name); - + const CosLifeCycle::Criteria &criteria_; }; diff --git a/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.h b/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.h index 287f58d2e1e..6730e707e99 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.h +++ b/TAO/orbsvcs/LifeCycle_Service/Factory_Trader.h @@ -14,7 +14,7 @@ // // ============================================================================ -#if !defined (FACTORY_TRADER_H) +#ifndef FACTORY_TRADER_H #define FACTORY_TRADER_H #include "tao/corba.h" @@ -23,7 +23,7 @@ #include "orbsvcs/CosLifeCycleC.h" -class Factory_Trader +class Factory_Trader { public: Factory_Trader (); @@ -31,11 +31,11 @@ public: void add_type (); // Add a the Factory type to the repository - + void export (const char * name, - const char * location, - const char * description, - const CORBA::Object_ptr object_ptr); + const char * location, + const char * description, + const CORBA::Object_ptr object_ptr); // export a specific factory CORBA::Object_ptr query (const CORBA::String constraint); diff --git a/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service.h b/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service.h index 065b10fcd24..ab24a98dc6f 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service.h +++ b/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service.h @@ -14,10 +14,15 @@ // ============================================================================ #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/TAO.h" #include "Life_Cycle_Service_i.h" -#if !defined (LIFE_CYCLE_SERVICE_H) +#ifndef LIFE_CYCLE_SERVICE_H #define IFE_CYCLE_SERVICE_H class Life_Cycle_Service_Server @@ -48,7 +53,7 @@ private: // instance of the ORB Manager Life_Cycle_Service_i *life_Cycle_Service_i_ptr_; - // Instance of the creation service + // Instance of the creation service CosNaming::NamingContext_var namingContext_var_; // reference to the naming service diff --git a/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service_i.h b/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service_i.h index 93730aa7887..7b4aa4d18ba 100644 --- a/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service_i.h +++ b/TAO/orbsvcs/LifeCycle_Service/Life_Cycle_Service_i.h @@ -17,7 +17,7 @@ #include "Factory_Trader.h" #include "Criteria_Evaluator.h" -#if !defined (LIFE_CYCLE_SERVICE_IMPL_H) +#ifndef LIFE_CYCLE_SERVICE_IMPL_H #define LIFE_CYCLE_SERVICE_IMPL_H class Life_Cycle_Service_i : public POA_LifeCycleService::Life_Cycle_Service @@ -34,7 +34,7 @@ public: // Returns true if the Generic Factory is able to forward a request // for creating an object described by the <factory_key>. - CORBA::Object_ptr create_object (const CosLifeCycle::Key &factory_key, + CORBA::Object_ptr create_object (const CosLifeCycle::Key &factory_key, const CosLifeCycle::Criteria &the_criteria, CORBA::Environment &_env_there); // Returns an object reference to a newly created object, though the @@ -42,14 +42,14 @@ public: // request to a more concrete Factory. void register_factory (const char * name, - const char * location, - const char * description, - CORBA::Object_ptr object, - CORBA::Environment &_env_there); + const char * location, + const char * description, + CORBA::Object_ptr object, + CORBA::Environment &_env_there); // Registers a factory with specified properties private: - Factory_Trader *factory_trader_ptr_; + Factory_Trader *factory_trader_ptr_; }; #endif /* LIFE_CYCLE_SERVICE_IMPL_H */ diff --git a/TAO/orbsvcs/Logging_Service/Logging_Service_i.h b/TAO/orbsvcs/Logging_Service/Logging_Service_i.h index 653483fe6a9..e240453fcab 100644 --- a/TAO/orbsvcs/Logging_Service/Logging_Service_i.h +++ b/TAO/orbsvcs/Logging_Service/Logging_Service_i.h @@ -20,10 +20,15 @@ // // ============================================================================ -#if !defined (_LOG_SERVER_H) +#ifndef _LOG_SERVER_H #define _LOG_SERVER_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Log_Msg.h" #include "tao/TAO.h" #include "orbsvcs/CosNamingC.h" @@ -51,17 +56,17 @@ public: int init (int argc, char **argv, - CORBA::Environment& env); + CORBA::Environment& env); // Initialize the Logger_Server state - parsing arguments and ... int run (CORBA::Environment& env); - // Run the ORB. + // Run the ORB. Logger_ptr make_logger (const char *name, - CORBA::Environment &_env); + CORBA::Environment &_env); // This function creates and returns a logger with the given <name>. // Currently, <name> is unused. - + private: int parse_args (void); // Parses the commandline arguments. @@ -79,7 +84,7 @@ private: Logger_Factory_i factory_impl_; // Implementation object of the Logger_Factory. - + Logger_Factory_var factory_; // Factory_var to register with NamingService. @@ -91,7 +96,7 @@ private: char* service_name_; // The id to give the Logger_Factory instance (defaults to - // "LoggingService") + // "LoggingService") }; #endif /* _LOG_SERVER_H */ diff --git a/TAO/orbsvcs/Naming_Service/Naming_Service.h b/TAO/orbsvcs/Naming_Service/Naming_Service.h index ae7fe95ce48..819f496802f 100644 --- a/TAO/orbsvcs/Naming_Service/Naming_Service.h +++ b/TAO/orbsvcs/Naming_Service/Naming_Service.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if !defined (TAO_NAMING_SERVICE_H) +#ifndef TAO_NAMING_SERVICE_H #define TAO_NAMING_SERVICE_H #include "tao/TAO.h" diff --git a/TAO/orbsvcs/Trading_Service/Trading_Service.h b/TAO/orbsvcs/Trading_Service/Trading_Service.h index 55210166821..aefadda286c 100644 --- a/TAO/orbsvcs/Trading_Service/Trading_Service.h +++ b/TAO/orbsvcs/Trading_Service/Trading_Service.h @@ -4,20 +4,25 @@ // // = BINARY // trader -// -// = FILENAME +// +// = FILENAME // Trading_Service.h -// -// = AUTHOR -// Seth Widoff <sbw1@cs.wustl.edu> -// -// ======================================================================= +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// +// ======================================================================= -#if !defined (_TRADING_SERVICE_H) +#ifndef _TRADING_SERVICE_H #define _TRADING_SERVICE_H #include "tao/TAO.h" #include "ace/Auto_Ptr.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/IOR_Multicast.h" #include "orbsvcs/Trader/Trader.h" #include "orbsvcs/Trader/Service_Type_Repository.h" @@ -47,26 +52,26 @@ public: Trading_Service (void); // Default constructor. - + ~Trading_Service (void); // Destructor int init (int argc, char* argv[]); // Initialize the Trading Service with arguments. - + int run (void); // Run the Trading Service. int shutdown (void); - + private: int init_multicast_server (void); - // Enable the Trading Service to answer multicast requests for its IOR. + // Enable the Trading Service to answer multicast requests for its IOR. int bootstrap_to_federation (void); // Bootstrap to another trader, and attach to its trader network. - + int parse_args (int& argc, char *argv[]); // parses the arguments. @@ -81,16 +86,16 @@ private: CORBA::String_var name_; // Name of this trading service: "hostname:pid". - + CORBA::String_var ior_; - // IOR of the trader kept around for handiness purposes. - + // IOR of the trader kept around for handiness purposes. + CORBA::Boolean federate_; // Flag indicating whether this trader should join the federation. CORBA::Boolean bootstrapper_; - // Flag inidicating whether we're the trader others are bootstrapping to. - + // Flag inidicating whether we're the trader others are bootstrapping to. + TAO_IOR_Multicast ior_multicast_; // Event handler that responds to resolve_initial_references requests. }; diff --git a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h index 082b96ddbb6..5882da9dc92 100644 --- a/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h +++ b/TAO/orbsvcs/orbsvcs/AV/AVStreams_i.h @@ -6,24 +6,29 @@ // // = LIBRARY // cos -// +// // = FILENAME // AVStreams_i.h // // = AUTHOR // Sumedh Mungee <sumedh@cs.wustl.edu> -// -// +// +// // ============================================================================ -#if !defined (AVSTREAMS_I_H) -#define AVSTREAMS_I_H +#ifndef AVSTREAMS_I_H +#define AVSTREAMS_I_H #include "orbsvcs/orbsvcs_export.h" #include "orbsvcs/CosPropertyServiceS.h" #include "orbsvcs/AVStreamsS.h" #include "orbsvcs/Property/CosPropertyService_i.h" #include "ace/Process.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/CosNamingC.h" #include "orbsvcs/AV/Endpoint_Strategy.h" #include "orbsvcs/Null_MediaCtrlS.h" @@ -35,76 +40,76 @@ public: AV_Null_MediaCtrl (void); }; -class TAO_ORBSVCS_Export TAO_Basic_StreamCtrl +class TAO_ORBSVCS_Export TAO_Basic_StreamCtrl : public virtual POA_AVStreams::Basic_StreamCtrl // = DESCRIPTION // Base class for StreamCtrl, implements basic stream start -// and stop functionality +// and stop functionality { public: TAO_Basic_StreamCtrl (void); // Default Constructor - virtual void stop (const AVStreams::flowSpec &the_spec, + virtual void stop (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Stop the transfer of data of the stream // Empty the_spec means apply operation to all flows - virtual void start (const AVStreams::flowSpec &the_spec, + virtual void start (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); - // Start the transfer of data in the stream. - // Empty the_spec means apply operation to all flows + // Start the transfer of data in the stream. + // Empty the_spec means apply operation to all flows - virtual void destroy (const AVStreams::flowSpec &the_spec, + virtual void destroy (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); - // Tears down the stream. This will close the connection, and delete + // Tears down the stream. This will close the connection, and delete // the streamendpoint and vdev associated with this stream // Empty the_spec means apply operation to all flows - virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, - const AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Changes the QoS associated with the stream // Empty the_spec means apply operation to all flows - virtual void push_event (const char *the_event, + virtual void push_event (const char *the_event, CORBA::Environment &env); // Used by StreamEndPoint and VDev to inform StreamCtrl of events. // E.g., loss of flow, reestablishment of flow, etc.. - - virtual void set_FPStatus (const AVStreams::flowSpec &the_spec, - const char *fp_name, - const CORBA::Any &fp_settings, + + virtual void set_FPStatus (const AVStreams::flowSpec &the_spec, + const char *fp_name, + const CORBA::Any &fp_settings, CORBA::Environment &env); // Used to control the flow protocol parameters. - virtual CORBA::Object_ptr get_flow_connection (const char *flow_name, + virtual CORBA::Object_ptr get_flow_connection (const char *flow_name, CORBA::Environment &env); - // Not implemented in the light profile, will raise the notsupported - // exception - - virtual void set_flow_connection (const char *flow_name, - CORBA::Object_ptr flow_connection, + // Not implemented in the light profile, will raise the notsupported + // exception + + virtual void set_flow_connection (const char *flow_name, + CORBA::Object_ptr flow_connection, CORBA::Environment &env); // Not implemented in the light profile, will raise the notsupported // exception - + virtual ~TAO_Basic_StreamCtrl (void); // Destructor protected: - + AVStreams::VDev_var vdev_a_; AVStreams::VDev_var vdev_b_; // The Virtual Devices for this stream - + AVStreams::StreamEndPoint_A_var stream_endpoint_a_; AVStreams::StreamEndPoint_B_var stream_endpoint_b_; // The Endpoints for this stream }; -class TAO_ORBSVCS_Export TAO_StreamCtrl - : public virtual POA_AVStreams::StreamCtrl, +class TAO_ORBSVCS_Export TAO_StreamCtrl + : public virtual POA_AVStreams::StreamCtrl, public virtual TAO_Basic_StreamCtrl // = DESCRIPTION // Implementation the A/V StreamCtrl class. this class @@ -114,11 +119,11 @@ class TAO_ORBSVCS_Export TAO_StreamCtrl public: TAO_StreamCtrl (void); // Default Constructor - - virtual CORBA::Boolean bind_devs (AVStreams::MMDevice_ptr a_party, - AVStreams::MMDevice_ptr b_party, - AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &the_flows, + + virtual CORBA::Boolean bind_devs (AVStreams::MMDevice_ptr a_party, + AVStreams::MMDevice_ptr b_party, + AVStreams::streamQoS &the_qos, + const AVStreams::flowSpec &the_flows, CORBA::Environment &env); // Establish a stream between a_party and b_party, // with qos the_qos, and for the flows in the_flows @@ -126,27 +131,27 @@ public: // Causes a connection to be established between the StreamEndpoints. // Returns success/failure - virtual CORBA::Boolean bind (AVStreams::StreamEndPoint_A_ptr a_party, - AVStreams::StreamEndPoint_B_ptr b_party, - AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &the_flows, + virtual CORBA::Boolean bind (AVStreams::StreamEndPoint_A_ptr a_party, + AVStreams::StreamEndPoint_B_ptr b_party, + AVStreams::streamQoS &the_qos, + const AVStreams::flowSpec &the_flows, CORBA::Environment &env); // Establish a connection between two streamendpoints. This can // be used if the streamendpoints have been created independent of // a MMDevice - - virtual void unbind_party (AVStreams::StreamEndPoint_ptr the_ep, - const AVStreams::flowSpec &the_spec, + + virtual void unbind_party (AVStreams::StreamEndPoint_ptr the_ep, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); - // Unbind the_ep from the stream. Empty the_spec means apply to all flows. - + // Unbind the_ep from the stream. Empty the_spec means apply to all flows. + virtual void unbind (CORBA::Environment &env); // unbind the stream. Same effect as Basic_StreamCtrl::destroy () - + virtual ~TAO_StreamCtrl (void); // Destructor -}; +}; class TAO_ORBSVCS_Export TAO_Base_StreamEndPoint @@ -167,13 +172,13 @@ public: virtual int handle_stop (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) = 0; // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, + + virtual int handle_start (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) = 0; // Application needs to define this - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, + + virtual int handle_destroy (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) = 0; // Application needs to define this }; @@ -193,12 +198,12 @@ class TAO_ORBSVCS_Export TAO_Server_Base_StreamEndPoint : public virtual TAO_Base_StreamEndPoint { public: - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, CORBA::Environment &env) = 0; // Application needs to define this }; -class TAO_ORBSVCS_Export TAO_StreamEndPoint +class TAO_ORBSVCS_Export TAO_StreamEndPoint : public virtual POA_AVStreams::StreamEndPoint, // The POA class public virtual TAO_Base_StreamEndPoint { @@ -209,84 +214,84 @@ public: TAO_StreamEndPoint (void); // Constructor - virtual void stop (const AVStreams::flowSpec &the_spec, + virtual void stop (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Stop the stream. Empty the_spec means, for all the flows - - virtual void start (const AVStreams::flowSpec &the_spec, + + virtual void start (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Start the stream, Empty the_spec means, for all the flows - virtual void destroy (const AVStreams::flowSpec &the_spec, + virtual void destroy (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Destroy the stream, Empty the_spec means, for all the flows - virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder, - AVStreams::streamQoS &qos_spec, - const AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder, + AVStreams::streamQoS &qos_spec, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env) = 0; // Called by StreamCtrl. responder is the peer to connect to - virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator, - CORBA::Boolean is_mcast, - AVStreams::streamQoS &qos, - AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator, + CORBA::Boolean is_mcast, + AVStreams::streamQoS &qos, + AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called by the peer StreamEndPoint. The flow_spec indicates the // flows (which contain transport addresses etc.) - virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, - const AVStreams::flowSpec &the_flows, + virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &new_qos, + const AVStreams::flowSpec &the_flows, CORBA::Environment &env); // Change the transport qos on a stream - - virtual CORBA::Boolean set_protocol_restriction (const AVStreams::protocolSpec &the_pspec, + + virtual CORBA::Boolean set_protocol_restriction (const AVStreams::protocolSpec &the_pspec, CORBA::Environment &env); // Used to restrict the set of protocols - - virtual void disconnect (const AVStreams::flowSpec &the_spec, + + virtual void disconnect (const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // disconnect the flows - - virtual void set_FPStatus (const AVStreams::flowSpec &the_spec, - const char *fp_name, - const CORBA::Any &fp_settings, + + virtual void set_FPStatus (const AVStreams::flowSpec &the_spec, + const char *fp_name, + const CORBA::Any &fp_settings, CORBA::Environment &env); // Used to control the flow - - virtual CORBA::Object_ptr get_fep (const char *flow_name, + + virtual CORBA::Object_ptr get_fep (const char *flow_name, CORBA::Environment &env); // Not implemented in the light profile, throws notsupported - virtual char * add_fep (CORBA::Object_ptr the_fep, + virtual char * add_fep (CORBA::Object_ptr the_fep, CORBA::Environment &env); // Not implemented in the light profile, throws notsupported - - virtual void remove_fep (const char *fep_name, + + virtual void remove_fep (const char *fep_name, CORBA::Environment &env); // Not implemented in the light profile, throws notsupported - - virtual void set_negotiator (AVStreams::Negotiator_ptr new_negotiator, + + virtual void set_negotiator (AVStreams::Negotiator_ptr new_negotiator, CORBA::Environment &env); // Used to "attach" a negotiator to the endpoint - - virtual void set_key (const char *flow_name, + + virtual void set_key (const char *flow_name, const AVStreams::encryption_key & the_key, CORBA::Environment &env); - // Used for public key encryption. - - virtual void set_source_id (CORBA::Long source_id, + // Used for public key encryption. + + virtual void set_source_id (CORBA::Long source_id, CORBA::Environment &env); // Used to set a unique id for packets sent by this streamendpoint virtual ~TAO_StreamEndPoint (void); // Destructor - + }; -class TAO_ORBSVCS_Export TAO_Client_StreamEndPoint : - public virtual POA_AVStreams::StreamEndPoint_A, +class TAO_ORBSVCS_Export TAO_Client_StreamEndPoint : + public virtual POA_AVStreams::StreamEndPoint_A, public virtual TAO_StreamEndPoint, public virtual TAO_Client_Base_StreamEndPoint { @@ -296,25 +301,25 @@ public: TAO_Client_StreamEndPoint (void); // Constructor - virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder, - AVStreams::streamQoS &qos_spec, - const AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder, + AVStreams::streamQoS &qos_spec, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called by StreamCtrl. responder is the peer to connect to - virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos, - AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos, + AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Used for ATM-style multicast - - virtual CORBA::Boolean connect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep, - AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &the_flows, + + virtual CORBA::Boolean connect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep, + AVStreams::streamQoS &the_qos, + const AVStreams::flowSpec &the_flows, CORBA::Environment &env); // Used for ATM-style multicast - virtual void disconnect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep, - const AVStreams::flowSpec &theSpec, + virtual void disconnect_leaf (AVStreams::StreamEndPoint_B_ptr the_ep, + const AVStreams::flowSpec &theSpec, CORBA::Environment &env); // Used to remove a multicast leaf @@ -323,8 +328,8 @@ public: }; -class TAO_ORBSVCS_Export TAO_Server_StreamEndPoint : - public virtual POA_AVStreams::StreamEndPoint_B, +class TAO_ORBSVCS_Export TAO_Server_StreamEndPoint : + public virtual POA_AVStreams::StreamEndPoint_B, public virtual TAO_StreamEndPoint, public virtual TAO_Server_Base_StreamEndPoint // Abstract interface { @@ -334,21 +339,21 @@ public: TAO_Server_StreamEndPoint (void); // Constructor - virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder, - AVStreams::streamQoS &qos_spec, - const AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean connect (AVStreams::StreamEndPoint_ptr responder, + AVStreams::streamQoS &qos_spec, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); - virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator, - CORBA::Boolean is_mcast, - AVStreams::streamQoS &qos, - AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean request_connection (AVStreams::StreamEndPoint_ptr initiator, + CORBA::Boolean is_mcast, + AVStreams::streamQoS &qos, + AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called by the peer StreamEndPoint. The flow_spec indicates the // flows (which contain transport addresses etc.) - virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos, - AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean multiconnect (AVStreams::streamQoS &the_qos, + AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Used for internet-style multicast @@ -356,8 +361,8 @@ public: // Destructor }; -class TAO_ORBSVCS_Export TAO_VDev - :public virtual TAO_PropertySet, +class TAO_ORBSVCS_Export TAO_VDev + :public virtual TAO_PropertySet, public virtual POA_AVStreams::VDev // = DESCRIPTION // Implements the VDev interface. One of these is created per connection, @@ -367,36 +372,36 @@ class TAO_ORBSVCS_Export TAO_VDev TAO_VDev (void); // Default Constructor - virtual CORBA::Boolean set_peer (AVStreams::StreamCtrl_ptr the_ctrl, - AVStreams::VDev_ptr the_peer_dev, - AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean set_peer (AVStreams::StreamCtrl_ptr the_ctrl, + AVStreams::VDev_ptr the_peer_dev, + AVStreams::streamQoS &the_qos, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called to tell the vdev who the streamctrl, peer vdev is - virtual CORBA::Boolean set_Mcast_peer (AVStreams::StreamCtrl_ptr the_ctrl, - AVStreams::MCastConfigIf_ptr a_mcastconfigif, - AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean set_Mcast_peer (AVStreams::StreamCtrl_ptr the_ctrl, + AVStreams::MCastConfigIf_ptr a_mcastconfigif, + AVStreams::streamQoS &the_qos, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Used to set the streamctrl and multicast device - - virtual void configure (const CosPropertyService::Property &the_config_mesg, + + virtual void configure (const CosPropertyService::Property &the_config_mesg, CORBA::Environment &env); // Called by the peer VDev to configure the device (catch all) - - virtual void set_format (const char *flowName, - const char *format_name, + + virtual void set_format (const char *flowName, + const char *format_name, CORBA::Environment &env); // Used to set a format on a flowname - - virtual void set_dev_params (const char *flowName, - const CosPropertyService::Properties &new_params, + + virtual void set_dev_params (const char *flowName, + const CosPropertyService::Properties &new_params, CORBA::Environment &env); // Used to set device parameters - - virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &the_qos, - const AVStreams::flowSpec &the_spec, + + virtual CORBA::Boolean modify_QoS (AVStreams::streamQoS &the_qos, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called to change QoS of the device @@ -410,21 +415,21 @@ class TAO_ORBSVCS_Export TAO_VDev private: AVStreams::StreamCtrl_var streamctrl_; // My stream controller - + AVStreams::VDev_var peer_; // My peer }; class TAO_AV_Endpoint_Strategy; -class TAO_ORBSVCS_Export TAO_MMDevice - : public virtual TAO_PropertySet, +class TAO_ORBSVCS_Export TAO_MMDevice + : public virtual TAO_PropertySet, public virtual POA_AVStreams::MMDevice // = DESCRIPTION // Implements a factory to create Endpoints and VDevs { protected: - + TAO_AV_Endpoint_Strategy *endpoint_strategy_; public: @@ -447,21 +452,21 @@ class TAO_ORBSVCS_Export TAO_MMDevice CORBA::Environment &env); // Multicast bind - virtual AVStreams::StreamEndPoint_A_ptr create_A (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, + virtual AVStreams::StreamEndPoint_A_ptr create_A (AVStreams::StreamCtrl_ptr the_requester, + AVStreams::VDev_out the_vdev, + AVStreams::streamQoS &the_qos, + CORBA::Boolean_out met_qos, + char *&named_vdev, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called by StreamCtrl to create a "A" type streamandpoint and vdev - - virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, + + virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester, + AVStreams::VDev_out the_vdev, + AVStreams::streamQoS &the_qos, + CORBA::Boolean_out met_qos, + char *&named_vdev, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called by StreamCtrl to create a "B" type streamandpoint and vdev @@ -474,14 +479,14 @@ class TAO_ORBSVCS_Export TAO_MMDevice CORBA::Environment &env); // Not supported in the light profile, raises notsupported - virtual CORBA::Object_ptr get_fdev (const char *flow_name, + virtual CORBA::Object_ptr get_fdev (const char *flow_name, CORBA::Environment &env); // Not supported in the light profile, raises notsupported - virtual void remove_fdev (const char *flow_name, + virtual void remove_fdev (const char *flow_name, CORBA::Environment &env); // Not supported in the light profile, raises notsupported - + virtual ~TAO_MMDevice (void); // Destructor }; diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h index 22b68d9a8ac..d964036148a 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h +++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy.h @@ -6,18 +6,18 @@ // // = LIBRARY // cos -// +// // = FILENAME // Endpoint_Strategy.h // // = AUTHOR // Sumedh Mungee <sumedh@cs.wustl.edu> -// -// +// +// // ============================================================================ -#if !defined (TAO_AV_ENDPOINT_STRATEGY_H) -#define TAO_AV_ENDPOINT_STRATEGY_H +#ifndef TAO_AV_ENDPOINT_STRATEGY_H +#define TAO_AV_ENDPOINT_STRATEGY_H #include "orbsvcs/AV/AVStreams_i.h" #include "tao/TAO.h" @@ -87,7 +87,7 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Process_Strategy virtual int get_vdev (CORBA::Environment &env); // Get the Vdev object reference for the newly created - // endpoint + // endpoint CosNaming::NamingContext_var naming_context_; // Naming context @@ -97,10 +97,10 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Process_Strategy char host_[MAXHOSTNAMELEN]; // name of this host used for resolving unique names. - + pid_t pid_; // My child's process id. -}; +}; // ---------------------------------------------------------------------- @@ -117,7 +117,7 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Process_Strategy_A virtual ~TAO_AV_Endpoint_Process_Strategy_A (void); // Destructor. - protected: + protected: virtual int create_A (AVStreams::StreamEndPoint_A_ptr &stream_endpoint, AVStreams::VDev_ptr &vdev, CORBA::Environment &env); @@ -125,8 +125,8 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Process_Strategy_A virtual int get_stream_endpoint (CORBA::Environment &env); // Gets the "A" type stream endpoint from the child process - -}; + +}; // ---------------------------------------------------------------------- @@ -147,12 +147,12 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Process_Strategy_B AVStreams::VDev_ptr &vdev, CORBA::Environment &env); // Creates a "B" type stream endpoint, and a vdev - - + + virtual int get_stream_endpoint (CORBA::Environment &env); // Gets the object reference of the "B" type streamendpoint. - -}; + +}; // Include the templates here. #include "Endpoint_Strategy_T.h" diff --git a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h index da3ffcad393..8483ce20a34 100644 --- a/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h +++ b/TAO/orbsvcs/orbsvcs/AV/Endpoint_Strategy_T.h @@ -1,6 +1,6 @@ // $Id$ -#if !defined (TAO_AV_ENDPOINT_STRATEGY_T_H) +#ifndef TAO_AV_ENDPOINT_STRATEGY_T_H #define TAO_AV_ENDPOINT_STRATEGY_T_H #include "Endpoint_Strategy.h" @@ -20,10 +20,10 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Reactive_Strategy virtual int activate (void); // creates and activates the streamendpoint, vdev, and mediacontrol - + virtual int activate_stream_endpoint (CORBA::Environment &env) = 0; // activates the stream_endpoint with the POA - + virtual int activate_vdev (CORBA::Environment &env); // activates the vdev with the POA @@ -70,7 +70,7 @@ class TAO_ORBSVCS_Export TAO_AV_Endpoint_Reactive_Strategy_A CORBA::Environment &env); // Called by the MMDevice, when it needs to create an A type endpoint - + }; // ---------------------------------------------------------------------- @@ -114,22 +114,22 @@ public: int init (int argc, char **argv); // Initializes the ORB, creates and activates the // T_StreamEndpoint, T_VDev, T_MediaCtrl in the POA - + int run (ACE_Time_Value *tv = 0); // runs the ORB event loop protected: - int activate_objects (int argc, + int activate_objects (int argc, char **argv, CORBA::Environment &env); // Creates the objects and inserts them into the Naming // Service, so the parent can pick the IOR's and // return them to the client - + int bind_to_naming_service (CORBA::Environment &env); // Binds to the naming service - + int register_vdev (CORBA::Environment &env); // Registers vdev with the naming service @@ -171,9 +171,9 @@ public: T_MediaCtrl *media_ctrl_; // Media controller - + pid_t pid_; - // pid of this process + // pid of this process char host_[MAXHOSTNAMELEN]; // Name of the host. diff --git a/TAO/orbsvcs/orbsvcs/Channel_Clients.h b/TAO/orbsvcs/orbsvcs/Channel_Clients.h index 487e688eb2c..ce4252418cb 100644 --- a/TAO/orbsvcs/orbsvcs/Channel_Clients.h +++ b/TAO/orbsvcs/orbsvcs/Channel_Clients.h @@ -5,7 +5,7 @@ // // = LIBRARY // ace -// +// // = FILENAME // Channel_Clients // diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.h b/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.h index e384b935053..129022f97ae 100644 --- a/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.h +++ b/TAO/orbsvcs/orbsvcs/Concurrency/CC_Lock.h @@ -18,10 +18,15 @@ // // ============================================================================ -#if !defined (_CC_LOCK_H) +#ifndef _CC_LOCK_H #define _CC_LOCK_H #include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/CosConcurrencyControlC.h" #define NUMBER_OF_LOCK_MODES 5 diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h index f316ecfc6e1..5b6087189c5 100644 --- a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h +++ b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSet.h @@ -32,10 +32,15 @@ // // ============================================================================ -#if !defined (_CC_LOCKSET_H) +#ifndef _CC_LOCKSET_H #define _CC_LOCKSET_H #include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Token.h" #include "orbsvcs/CosConcurrencyControlS.h" @@ -76,21 +81,21 @@ public: // = CosConcurrencyControl methods virtual void lock (CosConcurrencyControl::lock_mode mode, - CORBA::Environment &env); + CORBA::Environment &env); // Acquires this lock. Blocks until lock is obtained virtual CORBA::Boolean try_lock (CosConcurrencyControl::lock_mode mode, - CORBA::Environment &env); + CORBA::Environment &env); // Tries to acquire this lock. If it is not possible to acquire the // lock, false is returned virtual void unlock (CosConcurrencyControl::lock_mode mode, - CORBA::Environment &env); + CORBA::Environment &env); // Releases this lock. virtual void change_mode (CosConcurrencyControl::lock_mode held_mode, - CosConcurrencyControl::lock_mode new_mode, - CORBA::Environment &env); + CosConcurrencyControl::lock_mode new_mode, + CORBA::Environment &env); // Changes the mode of this lock. // = Debugging methods diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSetFactory.h b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSetFactory.h index 5802cf81c3b..f0f12c6d214 100644 --- a/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSetFactory.h +++ b/TAO/orbsvcs/orbsvcs/Concurrency/CC_LockSetFactory.h @@ -18,7 +18,7 @@ // // ============================================================================ -#if !defined (_CC_LOCKSETFACTORY_H) +#ifndef _CC_LOCKSETFACTORY_H #define _CC_LOCKSETFACTORY_H // #include "tao/corba.h" diff --git a/TAO/orbsvcs/orbsvcs/Concurrency/Concurrency_Utils.h b/TAO/orbsvcs/orbsvcs/Concurrency/Concurrency_Utils.h index 0958472b535..112b433a9c3 100644 --- a/TAO/orbsvcs/orbsvcs/Concurrency/Concurrency_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Concurrency/Concurrency_Utils.h @@ -20,7 +20,7 @@ // // ============================================================================ -#if !defined (_CONCURRENCY_SERVER_H) +#ifndef _CONCURRENCY_SERVER_H #define _CONCURRENCY_SERVER_H #include "tao/corba.h" @@ -42,7 +42,7 @@ public: //Default constructor. TAO_Concurrency_Server (CORBA::ORB_var &orb, - PortableServer::POA_var &poa); + PortableServer::POA_var &poa); // Takes the POA under which to register the Concurrency Service // implementation object. diff --git a/TAO/orbsvcs/orbsvcs/Event/BCU.h b/TAO/orbsvcs/orbsvcs/Event/BCU.h index 07d64c46271..6e81c989e15 100644 --- a/TAO/orbsvcs/orbsvcs/Event/BCU.h +++ b/TAO/orbsvcs/orbsvcs/Event/BCU.h @@ -5,7 +5,7 @@ // // = LIBRARY // ace ORB -// +// // = FILENAME // Benchmark Computation Units // @@ -18,10 +18,15 @@ // numbers. // ============================================================================ -#if !defined (ACE_BCU_H) +#ifndef ACE_BCU_H #define ACE_BCU_H #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/orbsvcs_export.h" diff --git a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h index a3c398030c8..ddf74892afb 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h +++ b/TAO/orbsvcs/orbsvcs/Event/Dispatching_Modules.h @@ -5,7 +5,7 @@ // // = LIBRARY // orbsvcs -// +// // = FILENAME // Dispatching_Module // @@ -58,15 +58,15 @@ public: // Default construction. virtual void open (ACE_ES_Consumer_Module *up, - ACE_ES_Correlation_Module *down); + ACE_ES_Correlation_Module *down); // Link to adjacent modules. virtual void connected (ACE_Push_Consumer_Proxy *consumer, - CORBA::Environment &); + CORBA::Environment &); // Forward down_. virtual void disconnecting (ACE_Push_Consumer_Proxy *consumer, - CORBA::Environment &); + CORBA::Environment &); // Forward down_. virtual void disconnected (ACE_Push_Consumer_Proxy *consumer); @@ -77,11 +77,11 @@ public: // void disconnecting (ACE_Push_Supplier_Proxy *supplier); virtual void push (ACE_ES_Dispatch_Request *request, - CORBA::Environment &) = 0; + CORBA::Environment &) = 0; // Forward up_. virtual int dispatch_event (ACE_ES_Dispatch_Request *request, - u_long &command_action); + u_long &command_action); // Called by ACE_ES_Dispatch_Requests when dequeued by RT_Tasks. virtual void dispatch_queue_closed (ACE_ES_Dispatch_Queue *q); @@ -132,32 +132,32 @@ class TAO_ORBSVCS_Export ACE_ES_Dispatch_Request : public ACE_RT_Task_Command public: ACE_ES_Dispatch_Request (void); // Default construction. - + virtual ~ACE_ES_Dispatch_Request (void); // Default destruction. - - ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer, - RtecScheduler::handle_t rt_info); + + ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer, + RtecScheduler::handle_t rt_info); // All the events must be added after construction to the // event_set. - ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer, - const TAO_EC_Event_Array &event_set, - RtecScheduler::handle_t rt_info); + ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer, + const TAO_EC_Event_Array &event_set, + RtecScheduler::handle_t rt_info); // Set consumer_ to <consumer> and copy <event_set> to event_set_. // <rt_info> describes the method receiving this dispatch. ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer, - const RtecEventComm::Time &time, - RtecScheduler::handle_t rt_info); + const RtecEventComm::Time &time, + RtecScheduler::handle_t rt_info); // Set consumer_ to <consumer> and sets // single_event_.header.creation_time to <time>. Sets // use_single_event_ to 1. <rt_info> describes the method // receiving this dispatch. ACE_ES_Dispatch_Request (ACE_Push_Consumer_Proxy *consumer, - const TAO_EC_Event &event, - RtecScheduler::handle_t rt_info); + const TAO_EC_Event &event, + RtecScheduler::handle_t rt_info); // Sets consumer_ and the first slot of event_set_. We use the // event_set_ instead of the single_event_ so that we can just carry // around the pointer to <event>. <rt_info> describes the method @@ -167,8 +167,8 @@ public: // Description of the method receiving this request. void set (ACE_ES_Dispatching_Base *dispatching_module, - RtecScheduler::OS_Priority priority, - RtecScheduler::Preemption_Subpriority sub_priority); + RtecScheduler::OS_Priority priority, + RtecScheduler::Preemption_Subpriority sub_priority); // For multi-threaded implementations, <dispatching_module> is // called back when a request is dequeued. <priority> is the // dispatch priority of the event. <sub_priority> is the enqueue @@ -240,7 +240,7 @@ protected: #if defined (ACE_WIN32) class TAO_ORBSVCS_Export ACE_ES_ReactorEx_NS : public ACE_Notification_Strategy -// = TITLE +// = TITLE // Event Service ReactorEx Notification Strategy // // = DESCRIPTION @@ -252,7 +252,7 @@ class TAO_ORBSVCS_Export ACE_ES_ReactorEx_NS : public ACE_Notification_Strategy { public: ACE_ES_ReactorEx_NS (ACE_Event_Handler *eh, - TAO_EC_Timer_Module *tm); + TAO_EC_Timer_Module *tm); // Stores away <eh> for when this->open is called. int open (void); @@ -266,7 +266,7 @@ public: // point to a dispatching module. virtual int notify (void); virtual int notify (ACE_Event_Handler *, - ACE_Reactor_Mask mask); + ACE_Reactor_Mask mask); // ACE_HANDLE get_handle (void); // Returns event_.handle (). @@ -284,7 +284,7 @@ typedef ACE_ES_ReactorEx_NS ACE_ES_Notification_Strategy; #else // ******************************************************* class TAO_ORBSVCS_Export ACE_ES_Reactor_NS : public ACE_Reactor_Notification_Strategy -// = TITLE +// = TITLE // Event Service Reactor Notification Strategy // // = DESCRIPTION @@ -293,7 +293,7 @@ class TAO_ORBSVCS_Export ACE_ES_Reactor_NS : public ACE_Reactor_Notification_Str { public: ACE_ES_Reactor_NS (ACE_Event_Handler *eh, - TAO_EC_Timer_Module *tm); + TAO_EC_Timer_Module *tm); // Calls ACE_Reactor_Notification_Strategy with the ORB's reactor // and signal mask. @@ -330,18 +330,18 @@ class TAO_ORBSVCS_Export ACE_ES_Dispatch_Queue : public ACE_RT_Task { public: ACE_ES_Dispatch_Queue (ACE_ES_Dispatching_Base *dispatching_module, - ACE_ES_Notification_Strategy *notification_strategy); + ACE_ES_Notification_Strategy *notification_strategy); // Stores <dispatching_module> for this->threads_closed. Stores // away <notification_strategy> for this->synch_threads. int open_queue (RtecScheduler::Period &period, - int threads); + int threads); // This is a hack to get the channel to work with the new // scheduler. #if 0 int open_queue (RtecScheduler::OS_Priority priority, - int threads); + int threads); // Creates a name from the <priority> and tries to find a scheduling // qos structure. If one is not found, but created, qos_ is set // with default values. Either way, if qos_->thread_ > 0, it calls @@ -383,7 +383,7 @@ public: // Delete queues. void connected (ACE_Push_Consumer_Proxy *consumer, - CORBA::Environment &); + CORBA::Environment &); // Allocate any needed dispatching resources for this consumers // priority. @@ -395,7 +395,7 @@ public: // void disconnecting (ACE_Push_Supplier_Proxy *supplier); virtual void push (ACE_ES_Dispatch_Request *request, - CORBA::Environment &); + CORBA::Environment &); // Enqueues the request on the appropriate Dispatch Queue. virtual void activate (int threads_per_queue); @@ -465,7 +465,7 @@ public: // the dispatching base constructor. virtual void push (ACE_ES_Dispatch_Request *request, - CORBA::Environment &); + CORBA::Environment &); // Forward up_. }; @@ -480,16 +480,16 @@ class TAO_ORBSVCS_Export ACE_ES_RTU_Dispatching : public ACE_ES_Priority_Dispatc { public: ACE_ES_RTU_Dispatching (ACE_EventChannel *channel); - // Store <channel>. + // Store <channel>. virtual int dispatch_event (ACE_ES_Dispatch_Request *request, - u_long &command_action); + u_long &command_action); // Called by ACE_Dispatch_Queues and handle_signal when an event // needs to be dequeued. Implements an RTU-like delayed preemption // policy. virtual void push (ACE_ES_Dispatch_Request *request, - CORBA::Environment &); + CORBA::Environment &); // Calls ACE_ES_Priority_Dispatching::push and then checks if // preemption is necessary. }; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.h b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.h index 46a1ca2233e..e5ba8e67229 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway.h @@ -159,10 +159,10 @@ private: ACE_PushSupplier_Adapter<TAO_EC_Gateway_IIOP> supplier_; // Our supplier personality.... - // We use a different Consumer_Proxy + // We use a different Consumer_Proxy typedef ACE_Map_Manager<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> Consumer_Map; typedef ACE_Map_Iterator<RtecEventComm::EventSourceID,RtecEventChannelAdmin::ProxyPushConsumer_ptr,ACE_Null_Mutex> Consumer_Map_Iterator; - + Consumer_Map consumer_proxy_map_; RtecEventChannelAdmin::ProxyPushConsumer_var default_consumer_proxy_; // We talk to the EC (as a supplier) using either an per-supplier diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h index e5bfe24a4e8..b00aca0c11f 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_Gateway_UDP.h @@ -54,6 +54,11 @@ #define TAO_EC_GATEWAY_UDP_H #include "ace/SOCK_CODgram.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Dgram_Mcast.h" #include "orbsvcs/RtecEventChannelAdminS.h" #include "orbsvcs/RtecUDPAdminS.h" @@ -83,8 +88,8 @@ public: void init (RtecEventChannelAdmin::EventChannel_ptr lcl_ec, RtecScheduler::Scheduler_ptr lcl_sched, const char* lcl_name, - RtecUDPAdmin::AddrServer_ptr addr_server, - ACE_SOCK_Dgram* dgram, + RtecUDPAdmin::AddrServer_ptr addr_server, + ACE_SOCK_Dgram* dgram, CORBA::Environment &_env); // To do its job this class requires to know the local EC it will // connect to; it also requires to build an RT_Info for the local @@ -149,7 +154,7 @@ public: RtecScheduler::Scheduler_ptr lcl_sched, const char* lcl_name, const ACE_INET_Addr& ignore_from, - RtecUDPAdmin::AddrServer_ptr addr_server, + RtecUDPAdmin::AddrServer_ptr addr_server, CORBA::Environment &_env); // To do its job this class requires to know the local EC it will // connect to; it also requires to build an RT_Info for the local @@ -175,10 +180,10 @@ public: // The PushSupplier method. virtual void disconnect_push_supplier (CORBA::Environment &); - + void get_addr (const RtecEventComm::EventHeader& header, - RtecUDPAdmin::UDP_Addr_out addr, - CORBA::Environment& env); + RtecUDPAdmin::UDP_Addr_out addr, + CORBA::Environment& env); // Call the RtecUDPAdmin::AddrServer private: @@ -243,7 +248,7 @@ public: TAO_ECG_Mcast_EH (TAO_ECG_UDP_Receiver *recv); int open (RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + CORBA::Environment& _env); // Register for changes in the EC subscription list. // When the subscription list becomes non-empty we join the proper // multicast groups (using the receiver to translate between event @@ -260,9 +265,9 @@ public: // Reactor callbacks void update_consumer (const RtecEventChannelAdmin::ConsumerQOS& sub, - CORBA::Environment& _env); + CORBA::Environment& _env); void update_supplier (const RtecEventChannelAdmin::SupplierQOS& pub, - CORBA::Environment& _env); + CORBA::Environment& _env); // The Observer methods class Observer : public POA_RtecEventChannelAdmin::Observer @@ -282,9 +287,9 @@ public: // The Observer methods virtual void update_consumer (const RtecEventChannelAdmin::ConsumerQOS& sub, - CORBA::Environment& _env); + CORBA::Environment& _env); virtual void update_supplier (const RtecEventChannelAdmin::SupplierQOS& pub, - CORBA::Environment& _env); + CORBA::Environment& _env); private: TAO_ECG_Mcast_EH* eh_; diff --git a/TAO/orbsvcs/orbsvcs/Event/EC_UDP_Admin.h b/TAO/orbsvcs/orbsvcs/Event/EC_UDP_Admin.h index ef2220d1714..8d7c41842b0 100644 --- a/TAO/orbsvcs/orbsvcs/Event/EC_UDP_Admin.h +++ b/TAO/orbsvcs/orbsvcs/Event/EC_UDP_Admin.h @@ -14,7 +14,7 @@ // // = DESCRIPTION // Simple implementations of the UDP Administration service. -// +// // connects to a "remote" EC as a consumer, it also connects to the // <local> EC as a supplier of events, this later EC is usually // collocated. @@ -60,8 +60,8 @@ public: // = The RtecUDPAdmin::AddrServer methods virtual void get_addr (const RtecEventComm::EventHeader& header, - RtecUDPAdmin::UDP_Addr_out addr, - CORBA::Environment& env); + RtecUDPAdmin::UDP_Addr_out addr, + CORBA::Environment& env); private: CORBA::UShort port_; diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h index 2203852802e..27ed245a42d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Channel.h @@ -31,6 +31,11 @@ #define ACE_EVENT_CHANNEL_H #include "ace/Containers.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Map_Manager.h" #include "tao/Timeprobe.h" @@ -70,7 +75,7 @@ void operator += (TAO_EC_Event_Array &dest, // = DESCRIPTION // The Event Channel must compare events (actually event headers) // for equality. -// +// ACE_INLINE int operator == (const RtecEventComm::Event &event1, const RtecEventComm::Event &event2); @@ -200,8 +205,8 @@ public: SHUTDOWN = CONSUMER | SUPPLIER }; ACE_EventChannel (CORBA::Boolean activate_threads = 1, - u_long type = ACE_DEFAULT_EVENT_CHANNEL_TYPE, - TAO_Module_Factory* factory = 0); + u_long type = ACE_DEFAULT_EVENT_CHANNEL_TYPE, + TAO_Module_Factory* factory = 0); // Construction of the given <type>. Check the **_CHANNEL // enumerations defined below. // By default we activate the threads on construction, but it is @@ -272,9 +277,9 @@ public: virtual RtecEventChannelAdmin::Observer_Handle append_observer (RtecEventChannelAdmin::Observer_ptr observer, - CORBA::Environment &env); + CORBA::Environment &env); virtual void remove_observer (RtecEventChannelAdmin::Observer_Handle, - CORBA::Environment &env); + CORBA::Environment &env); // The observer manipulators // = Timer managment @@ -288,7 +293,7 @@ public: int cancel_timer (RtecScheduler::OS_Priority preemption_priority, int id, - ACE_ES_Timer_ACT *&act); + ACE_ES_Timer_ACT *&act); // Cancel the timer associated with the priority of // <preemption_priority> and <id>. <act> is filled in with the // Timer_ACT used when scheduling the timer. Returns 0 on success, @@ -327,10 +332,10 @@ private: // + When was the last update. // + Does it want to receive all changes? // - + Observer_Entry (void); Observer_Entry (RtecEventChannelAdmin::Observer_Handle h, - RtecEventChannelAdmin::Observer_ptr o); + RtecEventChannelAdmin::Observer_ptr o); RtecEventChannelAdmin::Observer_Handle handle; // The handle @@ -957,7 +962,7 @@ public: // Unregister the consumer from the Event Service. virtual void push (const ACE_ES_Dispatch_Request *request, - CORBA::Environment &); + CORBA::Environment &); RtecEventChannelAdmin::ConsumerAdmin_ptr get_ref (CORBA::Environment &); // Allow transformations to RtecEventChannelAdmin::ConsumerAdmin. @@ -971,7 +976,7 @@ public: void fill_qos (RtecEventChannelAdmin::ConsumerQOS& c_qos); // Fill the QoS with the disjuction off all the subscriptions in - // this EC. + // this EC. // It leaves the gateways out of the list. private: @@ -1159,14 +1164,14 @@ private: // = Push helper methods. int push_source (ACE_Push_Supplier_Proxy *source, - const TAO_EC_Event &event, - CORBA::Environment &_env); + const TAO_EC_Event &event, + CORBA::Environment &_env); // Push <event> to all consumers subscribed to all events from // <source>. Returns 0 on success, -1 on failure. int push_source_type (ACE_Push_Supplier_Proxy *source, const TAO_EC_Event &event, - CORBA::Environment &_env); + CORBA::Environment &_env); // Push <event> to all consumers subscribed to <event>.type_ from // <source>. Returns 0 on success, -1 on failure. @@ -1217,7 +1222,7 @@ public: virtual void push (ACE_Push_Supplier_Proxy *proxy, RtecEventComm::EventSet &event, - CORBA::Environment &); + CORBA::Environment &); // The supplier module acts on behalf of the supplier proxy to // forward events through the channel. @@ -1238,7 +1243,7 @@ public: void fill_qos (RtecEventChannelAdmin::SupplierQOS& s_qos); // Fill the QoS with the disjuction off all the publications in - // this EC. + // this EC. // It leaves the gateways out of the list. private: diff --git a/TAO/orbsvcs/orbsvcs/Event/Event_Manip.h b/TAO/orbsvcs/orbsvcs/Event/Event_Manip.h index c740d70303e..66a281e7c22 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Event_Manip.h +++ b/TAO/orbsvcs/orbsvcs/Event/Event_Manip.h @@ -20,7 +20,7 @@ // // ============================================================================ -#if !defined (TAO_EC_EVENT_MANIP_H) +#ifndef TAO_EC_EVENT_MANIP_H #define TAO_EC_EVENT_MANIP_H #include "orbsvcs/RtecEventCommC.h" @@ -44,7 +44,7 @@ public: ~TAO_EC_Event_Set (void); // destructor - + CORBA::ULong length (void) const; // The length. @@ -71,7 +71,7 @@ private: private: CORBA::ULong length_; // The length of the buffer. - + RtecEventComm::Event* buffer_; // The buffer. @@ -79,7 +79,7 @@ private: // Synchronize access to the class internals. CORBA::ULong refcnt_; - // The reference count. + // The reference count. }; class TAO_ORBSVCS_Export TAO_EC_Event @@ -104,7 +104,7 @@ public: CORBA::ULong index); // Constructor, we assume ownership (i.e. duplicate and release the // set) - + ~TAO_EC_Event (void); // Destructor diff --git a/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h b/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h index 5ff831379c2..ced85087e93 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h +++ b/TAO/orbsvcs/orbsvcs/Event/Fast_Reactor.h @@ -1,24 +1,29 @@ // // $Id$ // -#if !defined (FAST_REACTOR_H) +#ifndef FAST_REACTOR_H #define FAST_REACTOR_H #if defined (ACE_OLD_STYLE_REACTOR) # if defined (ACE_WIN32) # include "ace/ReactorEx.h" -# define ACE_ES_FAST_REACTOR_BASE ACE_ReactorEx -# else + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +# define ACE_ES_FAST_REACTOR_BASE ACE_ReactorEx +# else # include "ace/Reactor.h" -# define ACE_ES_FAST_REACTOR_BASE ACE_Reactor +# define ACE_ES_FAST_REACTOR_BASE ACE_Reactor # endif /* ACE_WIN32 */ #else # if defined (ACE_WIN32) # include "ace/WFMO_Reactor.h" # define ACE_ES_FAST_REACTOR_BASE ACE_WFMO_Reactor -# else +# else # include "ace/Select_Reactor.h" -# define ACE_ES_FAST_REACTOR_BASE ACE_Select_Reactor +# define ACE_ES_FAST_REACTOR_BASE ACE_Select_Reactor # endif /* ACE_WIN32 */ #endif /* ACE_OLD_STYLE_REACTOR */ //## end module.includes @@ -34,14 +39,14 @@ public: ACE_Time_Value *this_timeout = &timer_buf ; if (this->timer_queue_->calculate_timeout (max_wait_time, - this_timeout) == 0) + this_timeout) == 0) { - ACE_Time_Value t (0, 500000); - ACE_OS::select (0, 0, 0, 0, &t); + ACE_Time_Value t (0, 500000); + ACE_OS::select (0, 0, 0, 0, &t); } else { - ACE_OS::select (0, 0, 0, 0, this_timeout); + ACE_OS::select (0, 0, 0, 0, this_timeout); } return this->timer_queue_->expire () == -1 ? -1 : 0; diff --git a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h b/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h index 8ce6e79488b..c2c6f093f30 100644 --- a/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h +++ b/TAO/orbsvcs/orbsvcs/Event/GPlot_File.h @@ -10,10 +10,15 @@ // // ============================================================================ -#if !defined (ACE_GPlot_File_H) +#ifndef ACE_GPlot_File_H #define ACE_GPlot_File_H #include "ace/Map_Manager.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Synch.h" class TAO_ORBSVCS_Export ACE_GPlot_File @@ -25,7 +30,7 @@ class TAO_ORBSVCS_Export ACE_GPlot_File // entry value // entry value // entry value -// ... +// ... // They represent x,y pairs to be graphed by GPlot. entry's are // type long. value's are type long or float. { diff --git a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h b/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h index cc37eb01d12..4ba8dbb44c9 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h +++ b/TAO/orbsvcs/orbsvcs/Event/Local_ESTypes.h @@ -5,7 +5,7 @@ // // = LIBRARY // ORB Services -// +// // = FILENAME // Local_ESTypes.h // diff --git a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h index 4ec2467f90b..b246930b37a 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h +++ b/TAO/orbsvcs/orbsvcs/Event/Memory_Pools.h @@ -5,7 +5,7 @@ // // = LIBRARY // ORB Services -// +// // = FILENAME // Memory_Pools // @@ -18,6 +18,11 @@ #define ACE_MEMORY_POOLS_H #include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "Event_Channel.h" #include "Dispatching_Modules.h" @@ -31,10 +36,10 @@ typedef ACE_Thread_Mutex ACE_MEMORY_POOL_MUTEX; #endif /* ACE_HAS_THREAD_SPECIFIC_STORAGE || ACE_HAS_TSS_EMULATION || !ACE_HAS_THREADS */ -typedef char +typedef char ACE_ES_Dispatch_Request_Chunk[sizeof (ACE_ES_Dispatch_Request)]; -typedef ACE_Cached_Allocator<ACE_ES_Dispatch_Request_Chunk, ACE_MEMORY_POOL_MUTEX> +typedef ACE_Cached_Allocator<ACE_ES_Dispatch_Request_Chunk, ACE_MEMORY_POOL_MUTEX> _ACE_Dispatch_Request_Allocator; class TAO_ORBSVCS_Export ACE_ES_Dispatch_Request_Allocator : public _ACE_Dispatch_Request_Allocator diff --git a/TAO/orbsvcs/orbsvcs/Event/Module_Factory.h b/TAO/orbsvcs/orbsvcs/Event/Module_Factory.h index dd8198bc255..8233726cdea 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Module_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Event/Module_Factory.h @@ -50,7 +50,7 @@ class TAO_ORBSVCS_Export TAO_Module_Factory // achieved by constructing modules with different dynamic // types. This class encapsulates all the strategies creation in // a single point. - // + // public: virtual ~TAO_Module_Factory (void); @@ -93,7 +93,7 @@ class TAO_ORBSVCS_Export TAO_Default_Module_Factory : public TAO_Module_Factory // achieved by constructing modules with different dynamic // types. This class encapsulates all the strategies creation in // a single point. - // + // public: TAO_Default_Module_Factory (void); virtual ~TAO_Default_Module_Factory (void); @@ -137,7 +137,7 @@ class TAO_ORBSVCS_Export TAO_Reactive_Module_Factory : public TAO_Module_Factory // An Event Channel configured with this factory can exhibit high // priority inversion, but it should provide high-performance due // to the elimination of context switching. - // + // public: TAO_Reactive_Module_Factory (void); virtual ~TAO_Reactive_Module_Factory (void); diff --git a/TAO/orbsvcs/orbsvcs/Event/RT_Task.h b/TAO/orbsvcs/orbsvcs/Event/RT_Task.h index d506aa3393f..be8fc01ff9e 100644 --- a/TAO/orbsvcs/orbsvcs/Event/RT_Task.h +++ b/TAO/orbsvcs/orbsvcs/Event/RT_Task.h @@ -18,10 +18,15 @@ // // ============================================================================ -#if !defined (ACE_RT_TASK_H) +#ifndef ACE_RT_TASK_H #define ACE_RT_TASK_H #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/RtecSchedulerC.h" class TAO_ORBSVCS_Export ACE_RT_Thread_Manager : public ACE_Thread_Manager diff --git a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h index 3bd0a1c25c1..8ae5982544d 100644 --- a/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h +++ b/TAO/orbsvcs/orbsvcs/Event/ReactorTask.h @@ -13,6 +13,11 @@ // Added these. #include "ace/Timer_Heap.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Timer_List.h" #include "Local_ESTypes.h" @@ -61,7 +66,7 @@ private: ACE_Timer_List timer_queue_; // The timer storage mechanism used by reactor_. -#if !defined (ACE_OLD_STYLE_REACTOR) +#ifndef ACE_OLD_STYLE_REACTOR ACE_ES_Fast_Reactor fast_reactor_; // The timer dispatch mechanism. #endif /* ! ACE_OLD_STYLE_REACTOR */ diff --git a/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h b/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h index 6e0c39fc0e2..2d988fac177 100644 --- a/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h +++ b/TAO/orbsvcs/orbsvcs/Event/Timer_Module.h @@ -3,10 +3,15 @@ // $Id$ // -#if !defined(TAO_EC_TIMER_MODULE_H) +#ifndef TAO_EC_TIMER_MODULE_H #define TAO_EC_TIMER_MODULE_H #include "ace/ACE.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/Event_Service_Constants.h" #include "orbsvcs/orbsvcs/Event/RT_Task.h" @@ -53,8 +58,8 @@ public: // Add a timer at the given priority. virtual int register_handler (RtecScheduler::Preemption_Priority priority, - ACE_Event_Handler* eh, - ACE_HANDLE handle) = 0; + ACE_Event_Handler* eh, + ACE_HANDLE handle) = 0; // Register a handler????? virtual ACE_Reactor* reactor (RtecScheduler::Preemption_Priority priority) = 0; @@ -95,8 +100,8 @@ public: int id, const void*& act); virtual int register_handler (RtecScheduler::Preemption_Priority priority, - ACE_Event_Handler* eh, - ACE_HANDLE handle); + ACE_Event_Handler* eh, + ACE_HANDLE handle); virtual ACE_Reactor* reactor (RtecScheduler::Preemption_Priority priority); private: @@ -149,14 +154,14 @@ public: int id, const void*& act); virtual int register_handler (RtecScheduler::Preemption_Priority priority, - ACE_Event_Handler* eh, - ACE_HANDLE handle); + ACE_Event_Handler* eh, + ACE_HANDLE handle); virtual ACE_Reactor* reactor (RtecScheduler::Preemption_Priority priority); - + private: int shutdown_; // The reactors are shutdown, do not attempt to restart them. - + ReactorTask *reactorTasks[ACE_Scheduler_MAX_PRIORITIES]; // The set of ReactorTasks diff --git a/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h b/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h index 2cbc7cc9fc4..dd91d88c36e 100644 --- a/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h +++ b/TAO/orbsvcs/orbsvcs/Event_Service_Constants.h @@ -5,10 +5,15 @@ // the Scheduling Service implementation. // -#if !defined (ACE_ES_CONSTANTS_H) +#ifndef ACE_ES_CONSTANTS_H #define ACE_ES_CONSTANTS_H #include "ace/Message_Block.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Synch.h" #include "orbsvcs/Time_Utilities.h" diff --git a/TAO/orbsvcs/orbsvcs/IOR_Multicast.h b/TAO/orbsvcs/orbsvcs/IOR_Multicast.h index 5e9dfb36354..d5d1a8ee2ad 100644 --- a/TAO/orbsvcs/orbsvcs/IOR_Multicast.h +++ b/TAO/orbsvcs/orbsvcs/IOR_Multicast.h @@ -9,21 +9,26 @@ // = FILENAME // svr.h // -// = DESCRIPTION -// Defines a class that listens to a multicast address for client requests +// = DESCRIPTION +// Defines a class that listens to a multicast address for client requests // for ior of a bootstrappable service. -// +// // = AUTHORS // Sergio Flores-Gaitan // // ============================================================================ -#if !defined (TAO_IOR_MULTICAST_H) +#ifndef TAO_IOR_MULTICAST_H #define TAO_IOR_MULTICAST_H #include "tao/corba.h" #include "orbsvcs/orbsvcs_export.h" #include "ace/INET_Addr.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Dgram_Mcast.h" #include "ace/Reactor.h" @@ -35,7 +40,7 @@ class TAO_ORBSVCS_Export TAO_IOR_Multicast : public ACE_Event_Handler public: TAO_IOR_Multicast (void); - // Default constructor + // Default constructor TAO_IOR_Multicast (const char *ior, u_short port, @@ -46,16 +51,16 @@ public: u_short port, const char *mcast_addr, TAO_Service_ID service_id); - + // destructor ~TAO_IOR_Multicast (void); // call back when input is received on the handle. virtual int handle_input (ACE_HANDLE fd); - + // callback when a timeout has occurred. virtual int handle_timeout (const ACE_Time_Value &tv, - const void *arg); + const void *arg); // returns the internal handle used to receive multicast virtual ACE_HANDLE get_handle (void) const; @@ -65,8 +70,8 @@ private: // temporary buffer TAO_Service_ID service_id_; - // Service id that we're waiting for. - + // Service id that we're waiting for. + ACE_SOCK_Dgram_Mcast mcast_dgram_; // multicast endpoint of communication diff --git a/TAO/orbsvcs/orbsvcs/Log/Logger_i.h b/TAO/orbsvcs/orbsvcs/Log/Logger_i.h index 1b7756f7d92..722aa9bbf85 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Logger_i.h +++ b/TAO/orbsvcs/orbsvcs/Log/Logger_i.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if !defined (TAO_ORBSVCS_LOGGER_I_H) +#ifndef TAO_ORBSVCS_LOGGER_I_H #define TAO_ORBSVCS_LOGGER_I_H #include "orbsvcs/LoggerS.h" diff --git a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h b/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h index ce7bdca0f0f..ca51363c127 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h +++ b/TAO/orbsvcs/orbsvcs/Naming/CosNaming_i.h @@ -15,7 +15,7 @@ // // ============================================================================ -#if !defined (TAO_NAMING_I_H) +#ifndef TAO_NAMING_I_H #define TAO_NAMING_I_H #include "orbsvcs/CosNamingS.h" diff --git a/TAO/orbsvcs/orbsvcs/Naming/Entries.h b/TAO/orbsvcs/orbsvcs/Naming/Entries.h index 8aec6d8914d..e00e504723b 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Entries.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Entries.h @@ -5,42 +5,47 @@ // // = LIBRARY // cos -// +// // = FILENAME // Entries.h // // = AUTHOR // Marina Spivak <marina@cs.wustl.edu> -// +// // ============================================================================ -#if !defined (TAO_ENTRIES_H) +#ifndef TAO_ENTRIES_H #define TAO_ENTRIES_H #include "ace/Hash_Map_Manager.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Synch.h" #include "ace/SString.h" #include "tao/corba.h" #include "orbsvcs/CosNamingC.h" -class TAO_ORBSVCS_Export TAO_IntId +class TAO_ORBSVCS_Export TAO_IntId { // = TITLE // Stores information a context keeps for each bound name. - // + // // = DESCRIPTION // Each bound name is associated with an object reference and - // the type of binding. + // the type of binding. public: // = Initialization and termination methods. TAO_IntId (void); // Constructor. TAO_IntId (CORBA::Object_ptr obj, - CosNaming::BindingType type /* = CosNaming::nobject */); + CosNaming::BindingType type /* = CosNaming::nobject */); // Constructor. - + TAO_IntId (const TAO_IntId & rhs); // Copy constructor. @@ -50,37 +55,37 @@ public: void operator= (const TAO_IntId & rhs); // Assignment operator (does copy memory). - CORBA::Object_ptr ref_; + CORBA::Object_ptr ref_; // CORBA object reference of the bound object. - CosNaming::BindingType type_; + CosNaming::BindingType type_; // Indicator of whether the object is a NamingContext that should // participate in name resolution when compound names are used. }; -class TAO_ORBSVCS_Export TAO_ExtId +class TAO_ORBSVCS_Export TAO_ExtId { // = TITLE // Stores the name to which an object is bound. // // = DESCRIPTION // This class is used as the External ID for the - // <ACE_Hash_Map_Manager>. + // <ACE_Hash_Map_Manager>. public: // = Initialization and termination methods. TAO_ExtId (void); // Constructor. - TAO_ExtId (const char *id, - const char *kind); + TAO_ExtId (const char *id, + const char *kind); // Constructor. - + TAO_ExtId (const TAO_ExtId & rhs); // Copy constructor. ~TAO_ExtId (void); - // Destructor. + // Destructor. void operator= (const TAO_ExtId & rhs); // Assignment operator (does copy memory). @@ -94,10 +99,10 @@ public: u_long hash (void) const; // This class has to have a hash for use with ACE_Hash_Map_Manager. - ACE_CString kind_; + ACE_CString kind_; // Any information user wants to store (not used by Naming Service). - ACE_CString id_; + ACE_CString id_; // Any information user wants to store (not used by Naming Service). }; diff --git a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h index ca950c1d7f2..91f356d8989 100644 --- a/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Naming/Naming_Utils.h @@ -19,7 +19,7 @@ // // ============================================================================ -#if !defined (TAO_NAMING_UTILS_H) +#ifndef TAO_NAMING_UTILS_H #define TAO_NAMING_UTILS_H #include "tao/corba.h" diff --git a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h index ecce5aebc1b..560a5b08231 100644 --- a/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h +++ b/TAO/orbsvcs/orbsvcs/Property/CosPropertyService_i.h @@ -14,10 +14,15 @@ // // ============================================================================ -#if !defined (COSPROPERTYSERVICE_I_H) -#define COSPROPERTYSERVICE_I_H +#ifndef COSPROPERTYSERVICE_I_H +#define COSPROPERTYSERVICE_I_H #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/orbsvcs_export.h" #include "orbsvcs/CosPropertyServiceS.h" diff --git a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h index fd73102608d..81fcc5773eb 100644 --- a/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h +++ b/TAO/orbsvcs/orbsvcs/Runtime_Scheduler.h @@ -19,8 +19,8 @@ class TAO_ORBSVCS_Export ACE_Runtime_Scheduler : public POA_RtecScheduler::Sched // public: ACE_Runtime_Scheduler (int config_count, - ACE_Scheduler_Factory::POD_Config_Info config_info[], - int entry_count, + ACE_Scheduler_Factory::POD_Config_Info config_info[], + int entry_count, ACE_Scheduler_Factory::POD_RT_Info rt_info[]); // Initialize the data from the POD_RT_Info array. @@ -41,7 +41,7 @@ public: virtual void set (RtecScheduler::handle_t handle, RtecScheduler::Criticality criticality, RtecScheduler::Time time, - RtecScheduler::Time typical_time, + RtecScheduler::Time typical_time, RtecScheduler::Time cached_time, RtecScheduler::Period period, RtecScheduler::Importance importance, @@ -80,7 +80,7 @@ public: virtual void compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Config_Info_Set_out configs, + RtecScheduler::Config_Info_Set_out configs, CORBA::Environment &_env) TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::UTILIZATION_BOUND_EXCEEDED, @@ -89,8 +89,8 @@ public: virtual void dispatch_configuration (RtecScheduler::Preemption_Priority p_priority, RtecScheduler::OS_Priority& priority, - RtecScheduler::Dispatching_Type & d_type, - CORBA::Environment &_env) + RtecScheduler::Dispatching_Type & d_type, + CORBA::Environment &_env) TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::NOT_SCHEDULED, RtecScheduler::UNKNOWN_PRIORITY_LEVEL)); diff --git a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h index 7b7f7fc9415..866b373dd72 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h +++ b/TAO/orbsvcs/orbsvcs/Sched/Config_Scheduler.h @@ -5,6 +5,10 @@ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/RtecSchedulerS.h" #include "orbsvcs/Event_Service_Constants.h" @@ -44,9 +48,9 @@ public: virtual void set (RtecScheduler::handle_t handle, RtecScheduler::Criticality criticality, - RtecScheduler::Time time, - RtecScheduler::Time typical_time, - RtecScheduler::Time cached_time, + RtecScheduler::Time time, + RtecScheduler::Time typical_time, + RtecScheduler::Time cached_time, RtecScheduler::Period period, RtecScheduler::Importance importance, RtecScheduler::Quantum quantum, @@ -84,7 +88,7 @@ public: virtual void compute_scheduling (CORBA::Long minimum_priority, CORBA::Long maximum_priority, RtecScheduler::RT_Info_Set_out infos, - RtecScheduler::Config_Info_Set_out configs, + RtecScheduler::Config_Info_Set_out configs, CORBA::Environment &_env) TAO_THROW_SPEC((CORBA::SystemException, RtecScheduler::UTILIZATION_BOUND_EXCEEDED, @@ -93,8 +97,8 @@ public: virtual void dispatch_configuration (RtecScheduler::Preemption_Priority p_priority, RtecScheduler::OS_Priority& priority, - RtecScheduler::Dispatching_Type & d_type, - CORBA::Environment &_env) + RtecScheduler::Dispatching_Type & d_type, + CORBA::Environment &_env) TAO_THROW_SPEC ((CORBA::SystemException, RtecScheduler::NOT_SCHEDULED, RtecScheduler::UNKNOWN_PRIORITY_LEVEL)); @@ -115,7 +119,7 @@ private: // trait for the scheduler implementation base class typedef ACE_DynScheduler BaseSchedImplType; - // traits for the scheduler strategy + // traits for the scheduler strategy #if defined (TAO_USES_MUF_SCHEDULING) typedef ACE_MUF_Scheduler_Strategy Scheduler_Strategy; diff --git a/TAO/orbsvcs/orbsvcs/Sched/DynSched.h b/TAO/orbsvcs/orbsvcs/Sched/DynSched.h index 3d44e52ca59..a4f7a67cd48 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/DynSched.h +++ b/TAO/orbsvcs/orbsvcs/Sched/DynSched.h @@ -17,10 +17,15 @@ // // ============================================================================ -#if ! defined (DYNSCHED_H) +#ifndef DYNSCHED_H #define DYNSCHED_H #include "ace/ACE.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Map_Manager.h" #include "ace/Message_Block.h" #include "ace/Synch.h" @@ -96,7 +101,7 @@ public: }; - + ///////////////////////////// // public member functions // ///////////////////////////// @@ -169,7 +174,7 @@ public: // Obtains an RT_Info based on its "handle". status_t lookup_config_info (Preemption_Priority priority, - Config_Info* &config_info); + Config_Info* &config_info); // Obtains a Config_Info based on its priority. status_t schedule (void); @@ -189,7 +194,7 @@ public: // subpriorities of the Task that was assigned handle. "preemption_prio" // is a platform-independent priority queue number, ranging from a // highest priority value of 0 to the lowest priority value, which is - // returned by "minimum_priority_queue ()". Returns 0 on success, + // returned by "minimum_priority_queue ()". Returns 0 on success, // or -1 if an invalid handle was supplied. // = Access the platform-independent priority value of the lowest-priority diff --git a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h index 496c242fd08..9c6141e14d6 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h +++ b/TAO/orbsvcs/orbsvcs/Sched/SchedEntry.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if ! defined (SCHEDENTRY_H) +#ifndef SCHEDENTRY_H #define SCHEDENTRY_H #include "orbsvcs/RtecSchedulerC.h" @@ -243,13 +243,13 @@ private: // The set of arrivals in the entry's effective period. ACE_Ordered_MultiSet<Dispatch_Entry_Link> dispatches_; - // Depth-first-search status of the entry. + // Depth-first-search status of the entry. DFS_Status dfs_status_; - // Depth-first-search discovery order of the entry. + // Depth-first-search discovery order of the entry. long discovered_; - // Depth-first-search completion order of the entry. + // Depth-first-search completion order of the entry. long finished_; // Flag identifying threads in the call graph. @@ -268,7 +268,7 @@ private: }; -// Wrapper for dependencies between RT_Infos +// Wrapper for dependencies between RT_Infos class TAO_ORBSVCS_Export Task_Entry_Link { public: diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h b/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h index 90106022157..257329bb4e7 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h +++ b/TAO/orbsvcs/orbsvcs/Sched/Scheduler.h @@ -18,10 +18,15 @@ // // ============================================================================ -#if ! defined (SCHEDULER_H) +#ifndef SCHEDULER_H #define SCHEDULER_H #include "ace/ACE.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Map_Manager.h" #include "ace/Message_Block.h" #include "ace/Synch.h" @@ -142,7 +147,7 @@ public: // In the SUCCEEDED and UNKNOWN_TASK cases, this->register_task // (rtinfo, 0, handle) is called. Returns FAILED if an error // occurs. - // + // // One motivation for allocating RT_Info's from within the Scheduler // is to allow RT_Infos to persist after the tasks that use them. // For instance, we may want to call this->schedule right before the @@ -151,11 +156,11 @@ public: // fail. virtual status_t lookup_rt_info (handle_t handle, - RT_Info* &rtinfo) = 0; + RT_Info* &rtinfo) = 0; // Obtains an RT_Info based on its "handle". virtual status_t lookup_config_info (Preemption_Priority priority, - Config_Info* &config_info) = 0; + Config_Info* &config_info) = 0; // Obtains a Config_Info based on its priority. @@ -178,7 +183,7 @@ public: // a highest priority value of 0 to the lowest priority value, which is // returned by "minimum_priority_queue ()". The current and deadline times // are part of the scheduling service implementation interface, but may be - // ignored by some implementations and used by others. + // ignored by some implementations and used by others. // = Access the platform-independent priority value of the lowest-priority // thread. @@ -215,7 +220,7 @@ public: // (debug) static int add_dependency(RT_Info* rt_info, - const Dependency_Info& d); + const Dependency_Info& d); static int number_of_dependencies(RT_Info* rt_info); static int number_of_dependencies(RT_Info& rt_info); @@ -225,7 +230,7 @@ public: virtual int dispatch_configuration (const Preemption_Priority &p_priority, OS_Thread_Priority& priority, - Dispatching_Type & d_type); + Dispatching_Type & d_type); // provide the thread priority and queue type for the given priority level diff --git a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h b/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h index a8546dfec12..68c33084cc0 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h +++ b/TAO/orbsvcs/orbsvcs/Sched/Scheduler_Generic.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if ! defined (SCHEDULER_INTERNAL_H) +#ifndef SCHEDULER_INTERNAL_H #define SCHEDULER_INTERNAL_H #include "Scheduler.h" @@ -50,7 +50,7 @@ public: // Obtains an RT_Info based on its "handle". virtual status_t lookup_config_info (Preemption_Priority priority, - Config_Info* &config_info); + Config_Info* &config_info); // Obtains a Config_Info based on its priority. // = Computes the schedule. diff --git a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h b/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h index 2abce70e8c2..15abbb9760a 100644 --- a/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h +++ b/TAO/orbsvcs/orbsvcs/Sched/Strategy_Scheduler.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if ! defined (STRATEGY_SCHEDULER_H) +#ifndef STRATEGY_SCHEDULER_H #define STRATEGY_SCHEDULER_H #include "DynSched.h" @@ -77,7 +77,7 @@ private: }; - + //////////////////////////////////////// // Factory for strategized schedulers // //////////////////////////////////////// @@ -150,7 +150,7 @@ public: // and then on the dependency topological sort finishing time (ascending). - virtual ACE_DynScheduler::Dispatching_Type + virtual ACE_DynScheduler::Dispatching_Type dispatch_type (const Dispatch_Entry &entry) = 0; // provide the dispatching queue type for the given dispatch entry @@ -172,7 +172,7 @@ protected: }; - + class TAO_ORBSVCS_Export ACE_MUF_Scheduler_Strategy : public ACE_Scheduler_Strategy // = TITLE // ACE_MUF_Scheduler_Strategy @@ -206,7 +206,7 @@ public: virtual ACE_DynScheduler::Preemption_Priority minimum_critical_priority (); // = determine the minimum critical priority number - virtual ACE_DynScheduler::Dispatching_Type + virtual ACE_DynScheduler::Dispatching_Type dispatch_type (const Dispatch_Entry &entry); // provide the dispatching queue type for the given dispatch entry @@ -269,7 +269,7 @@ public: virtual ACE_DynScheduler::Preemption_Priority minimum_critical_priority (); // = determine the minimum critical priority number - virtual ACE_DynScheduler::Dispatching_Type + virtual ACE_DynScheduler::Dispatching_Type dispatch_type (const Dispatch_Entry &entry); // provide the dispatching queue type for the given dispatch entry @@ -299,7 +299,7 @@ private: - + class TAO_ORBSVCS_Export ACE_MLF_Scheduler_Strategy : public ACE_Scheduler_Strategy // = TITLE // ACE_MLF_Scheduler_Strategy @@ -327,7 +327,7 @@ public: u_int count); // = sort the dispatch entry link pointer array in ascending laxity order - virtual ACE_DynScheduler::Dispatching_Type + virtual ACE_DynScheduler::Dispatching_Type dispatch_type (const Dispatch_Entry &entry); // provide the dispatching queue type for the given dispatch entry @@ -386,7 +386,7 @@ public: u_int count); // = sort the dispatch entry link pointer array in ascending deadline (period) order - virtual ACE_DynScheduler::Dispatching_Type + virtual ACE_DynScheduler::Dispatching_Type dispatch_type (const Dispatch_Entry &entry); // provide the dispatching queue type for the given dispatch entry @@ -418,7 +418,7 @@ private: }; - + class TAO_ORBSVCS_Export ACE_RMS_Dyn_Scheduler_Strategy : public ACE_Scheduler_Strategy // = TITLE // ACE_RMS_Dyn_Scheduler_Strategy @@ -451,7 +451,7 @@ public: virtual ACE_DynScheduler::Preemption_Priority minimum_critical_priority (); // = determine the minimum critical priority number - virtual ACE_DynScheduler::Dispatching_Type + virtual ACE_DynScheduler::Dispatching_Type dispatch_type (const Dispatch_Entry &entry); // provide the dispatching queue type for the given dispatch entry diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h index eb937fe61d1..95707b4370c 100644 --- a/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h +++ b/TAO/orbsvcs/orbsvcs/Scheduler_Factory.h @@ -5,6 +5,10 @@ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/CosNamingC.h" #include "orbsvcs/RtecSchedulerC.h" @@ -60,9 +64,9 @@ public: // = DESCRIPTION // This class provide us with a plain old data version of // configuration info, which is useful for implementing static arrays - // NOTE: if used in an array, the run-time scheduler requires that the - // array index match the preemption priority stored in the config info - // at that index: this is used to detect uninitialized/corrupted schedules + // NOTE: if used in an array, the run-time scheduler requires that the + // array index match the preemption priority stored in the config info + // at that index: this is used to detect uninitialized/corrupted schedules { RtecScheduler::Preemption_Priority preemption_priority; RtecScheduler::OS_Priority thread_priority; diff --git a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h b/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h index 327b915efb0..becd59c0c64 100644 --- a/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h +++ b/TAO/orbsvcs/orbsvcs/Scheduler_Utilities.h @@ -9,6 +9,10 @@ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/RtecSchedulerC.h" #include "orbsvcs/orbsvcs_export.h" diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h index f3bcc2b64c0..0b953421d15 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Nodes.h @@ -3,15 +3,15 @@ // ===================================================================== // $Id$ // -// = LIBRARY +// = LIBRARY // orbsvcs -// +// // = FILENAME // Constraint_Nodes.h -// -// = AUTHOR -// Seth Widoff <sbw1@cs.wustl.edu> -// +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// // ===================================================================== #ifndef TAO_CONSTRAINT_NODES_H @@ -46,22 +46,22 @@ public: // Implementing the pattern of double dispatching, each subclass of // TAO_Constraint will call back on an InterpreterVisitor the // method to handle a node of its ExpressionType. - + virtual TAO_Expression_Type expr_type (void) const = 0; // Return the expression type represented by this node. - - virtual ~TAO_Constraint (void) {} + + virtual ~TAO_Constraint (void) {} }; class TAO_Noop_Constraint : public TAO_Constraint // = TITLE -// A node that represents an operation with no operands. +// A node that represents an operation with no operands. { public: TAO_Noop_Constraint (TAO_Expression_Type type) : type_ (type) {} - + virtual int accept (TAO_Constraint_Visitor* visitor); virtual TAO_Expression_Type expr_type (void) const @@ -79,10 +79,10 @@ class TAO_Binary_Constraint : public TAO_Constraint // and right operands. { public: - + TAO_Binary_Constraint (TAO_Expression_Type op_type, - TAO_Constraint* left, - TAO_Constraint* right); + TAO_Constraint* left, + TAO_Constraint* right); virtual int accept (TAO_Constraint_Visitor* visitor); @@ -90,10 +90,10 @@ public: virtual TAO_Expression_Type expr_type (void) const { return this->op_; } - + TAO_Constraint* left_operand (void) const; // Return the left operand of the binary expression - + TAO_Constraint* right_operand (void) const; // Return the right operand of the binary expression @@ -114,16 +114,16 @@ public: static int visit_mult (TAO_Constraint_Visitor* , TAO_Binary_Constraint*); static int visit_div (TAO_Constraint_Visitor* , TAO_Binary_Constraint*); static int visit_twiddle (TAO_Constraint_Visitor* , TAO_Binary_Constraint*); - static int visit_in (TAO_Constraint_Visitor* , TAO_Binary_Constraint*); - + static int visit_in (TAO_Constraint_Visitor* , TAO_Binary_Constraint*); + private: TAO_Binary_Constraint (const TAO_Binary_Constraint&); TAO_Binary_Constraint& operator= (const TAO_Binary_Constraint&); - + TAO_Expression_Type op_; // The operator type - + TAO_Constraint* left_; TAO_Constraint* right_; // The operands of the expression @@ -136,27 +136,27 @@ class TAO_Unary_Constraint : public TAO_Constraint // one operand. { public: - + TAO_Unary_Constraint (TAO_Expression_Type op_type, - TAO_Constraint* operand); - + TAO_Constraint* operand); + virtual ~TAO_Unary_Constraint (void); - + virtual int accept (TAO_Constraint_Visitor* visitor); virtual TAO_Expression_Type expr_type (void) const { return this->op_; } - + TAO_Constraint* operand (void); - + private: TAO_Unary_Constraint (const TAO_Unary_Constraint&); TAO_Unary_Constraint& operator= (const TAO_Unary_Constraint&); - + TAO_Expression_Type op_; // The operator type - + TAO_Constraint* operand_; // The operand of the expression }; @@ -168,24 +168,24 @@ class TAO_Property_Constraint : public TAO_Constraint // value is determined by the offer being evaluated. { public: - + TAO_Property_Constraint (const char* name); virtual ~TAO_Property_Constraint (void); - + virtual int accept (TAO_Constraint_Visitor* visitor); virtual TAO_Expression_Type expr_type (void) const { return TAO_IDENT; } - + const char* name (void) const; // Returns the name of the property. - + private: TAO_Property_Constraint (const TAO_Property_Constraint&); TAO_Property_Constraint& operator= (const TAO_Property_Constraint&); - + char* name_; // The name of the property. }; @@ -194,7 +194,7 @@ class TAO_Literal_Constraint : public TAO_Constraint // // = TITLE // TAO_Literal_Constraint represents a literal occuring in -// the constraint expression tree. +// the constraint expression tree. { public: @@ -202,108 +202,108 @@ class TAO_Literal_Constraint : public TAO_Constraint : type_ (TAO_UNKNOWN) {} // = Constructors for each of the various types of literals. - - TAO_Literal_Constraint (CORBA::Any* any); + + TAO_Literal_Constraint (CORBA::Any* any); TAO_Literal_Constraint (CORBA::ULong uinteger); TAO_Literal_Constraint (CORBA::Long integer); TAO_Literal_Constraint (CORBA::Boolean boolean); - TAO_Literal_Constraint (CORBA::Double doub); + TAO_Literal_Constraint (CORBA::Double doub); TAO_Literal_Constraint (const char* str); - + TAO_Literal_Constraint (const TAO_Literal_Constraint& lit); // Copy constructor - + ~TAO_Literal_Constraint(void); // Destructor. - + virtual int accept (TAO_Constraint_Visitor* visitor); // Visitor accept methods. - + virtual TAO_Expression_Type expr_type (void) const { return type_; } void operator= (const TAO_Literal_Constraint& co); // Assignment operator. - + // Conversion routines. operator CORBA::Boolean (void) const; operator CORBA::ULong (void) const; - operator CORBA::Long (void) const; + operator CORBA::Long (void) const; operator CORBA::Double (void) const; operator const char* (void) const; - operator const CORBA::Any* (void) const; - + operator const CORBA::Any* (void) const; + // Return the type represented by this MysteryOperand. - + // = Comparison operators. - + friend int operator< (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator<= (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator> (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator>= (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator== (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator!= (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator== (double left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend int operator== (const TAO_String_Manager& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + // = Arithmetic operators. - + friend TAO_Literal_Constraint operator+ (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend TAO_Literal_Constraint operator- (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend TAO_Literal_Constraint operator* (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend TAO_Literal_Constraint operator/ (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); - + const TAO_Literal_Constraint& right); + friend TAO_Literal_Constraint operator- (const TAO_Literal_Constraint& operand); - + static TAO_Expression_Type widest_type (const TAO_Literal_Constraint& left, - const TAO_Literal_Constraint& right); + const TAO_Literal_Constraint& right); // Ensure both operands are of the same simple numeric type. - + static TAO_Expression_Type comparable_type (CORBA::TypeCode_ptr type); // Determine the comparable Expression Type from the CORBA type - + private: void copy (const TAO_Literal_Constraint& co); // Private copy method. - + union { char* str_; @@ -314,10 +314,10 @@ class TAO_Literal_Constraint : public TAO_Constraint CORBA::Double double_; } op_; // Union of the possible literal types. - + TAO_Expression_Type type_; // The actual types of the TAO_Literal_Constraint. - + }; #endif /* TAO_CONSTRAINT_NODES_H */ diff --git a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.h b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.h index d8653f45cea..a77cab4e473 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Constraint_Visitors.h @@ -3,15 +3,15 @@ // ======================================================================== // $Id$ // -// = LIBRARY +// = LIBRARY // orbsvcs -// +// // = FILENAME // Constraint_Visitor.h -// -// = AUTHOR -// Seth Widoff <sbw1@cs.wustl.edu> -// +// +// = AUTHOR +// Seth Widoff <sbw1@cs.wustl.edu> +// // ======================================================================== #ifndef TAO_CONSTRAINT_VISITOR_H @@ -45,12 +45,12 @@ class TAO_Constraint_Visitor // appropriate method on the visitor passed to it, based on its // own type. So, the Constraint_Visitor has a method to deal with // each possible type of node in an expression tree; one for each -// operator in the grammar. +// operator in the grammar. { public: virtual ~TAO_Constraint_Visitor (void) {} - + virtual int visit_constraint (TAO_Unary_Constraint* constraint) = 0; virtual int visit_with (TAO_Unary_Constraint* unary_with) = 0; @@ -58,7 +58,7 @@ public: virtual int visit_max (TAO_Unary_Constraint* unary_max) = 0; virtual int visit_first (TAO_Noop_Constraint* noop_first) = 0; virtual int visit_random (TAO_Noop_Constraint* noop_random) = 0; - + virtual int visit_and (TAO_Binary_Constraint* boolean_and) = 0; virtual int visit_or (TAO_Binary_Constraint* boolean_or) = 0; virtual int visit_not (TAO_Unary_Constraint* unary_not) = 0; @@ -110,13 +110,13 @@ class TAO_Constraint_Validator : public TAO_Constraint_Visitor // property names. The algorithm for type // checking is as follows: ensure that operand expression(s) // return the correct types using expr_returns* methods. If they - // (or it) return the correct types, call accept + // (or it) return the correct types, call accept // on each operand until all return true or one returns false, // at which point we can back out of the traversal and indicate - // failure. + // failure. { public: - + TAO_Constraint_Validator (const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct); // The constructor creates a map of property names to their values @@ -128,12 +128,12 @@ public: virtual ~TAO_Constraint_Validator (void); // Desctructor. - + int validate (TAO_Constraint* root); // Validate returns 1 if the expression tree whose root is <root> // makes semantic sense, in that the operands for each operation // comply with each other and the types accepted by the operator. - + // = Visitor Methods virtual int visit_constraint (TAO_Unary_Constraint* constraint); @@ -143,34 +143,34 @@ public: virtual int visit_max (TAO_Unary_Constraint* unary_max); virtual int visit_first (TAO_Noop_Constraint* noop_first); virtual int visit_random (TAO_Noop_Constraint* noop_random); - + virtual int visit_and (TAO_Binary_Constraint* boolean_and); virtual int visit_or (TAO_Binary_Constraint* boolean_or); // The two operands must return a boolean value. - + virtual int visit_not (TAO_Unary_Constraint* unary_not); // The operand must return a boolean value. - + virtual int visit_exist (TAO_Unary_Constraint* unary_exist); // The operand must return a valid (i.e., present in the service // type description) property name. - + virtual int visit_unary_minus (TAO_Unary_Constraint* unary_minus); // The operand must return a number to be negated. - + virtual int visit_add (TAO_Binary_Constraint* boolean_add); virtual int visit_sub (TAO_Binary_Constraint* boolean_sub); virtual int visit_mult (TAO_Binary_Constraint* boolean_mult); virtual int visit_div (TAO_Binary_Constraint* boolean_div); // Both operands must return numeric results. - + virtual int visit_twiddle (TAO_Binary_Constraint* binary_twiddle); // Both operands must return strings. - + virtual int visit_in (TAO_Binary_Constraint* binary_in); // The right operand must be a sequence of the same simple type as // the left operand. - + virtual int visit_less_than (TAO_Binary_Constraint* boolean_lt); virtual int visit_less_than_equal (TAO_Binary_Constraint* boolean_lte); virtual int visit_greater_than (TAO_Binary_Constraint* boolean_gt); @@ -178,28 +178,28 @@ public: virtual int visit_equal (TAO_Binary_Constraint* boolean_eq); virtual int visit_not_equal (TAO_Binary_Constraint* boolean_neq); // The left and right operands must both be of the same simple type. - + virtual int visit_literal (TAO_Literal_Constraint* literal); virtual int visit_property (TAO_Property_Constraint* literal); // The property must be defined in the service type description. - + private: - + TAO_Typecode_Table type_map_; // A map gleaned from the ServiceTypeStruct, which correlates // property names with their types. CORBA::TypeCode* extract_type (TAO_Constraint* expr_type, - TAO_Expression_Type& type); - + TAO_Expression_Type& type); + int expr_returns_boolean (TAO_Expression_Type expr_type); // expr_returns_boolean returns 1 if <expr_type>, when evaluated, will - // return a boolean. - + // return a boolean. + int expr_returns_number (TAO_Expression_Type expr_type); // expr_returns_boolean returns 1 if <expr_type>, when evaluated, will - // return a number. - + // return a number. + int expr_returns_string (TAO_Expression_Type expr_type); // expr_returns_boolean returns 1 if <expr_type>, when evaluated, will // return a string. @@ -220,7 +220,7 @@ class TAO_Constraint_Evaluator : public TAO_Constraint_Visitor // TAO_Constraint_Evaluator traverse a constraint expression tree, // and determines whether an offer fits the constraints // represented by the tree -// +// // = DESCRIPTION // Using the Visitor pattern, the TAO_Constraint_Evaluator has each // node of the expression tree call back to it with the method @@ -235,8 +235,8 @@ class TAO_Constraint_Evaluator : public TAO_Constraint_Visitor public: TAO_Constraint_Evaluator (CosTrading::Offer* offer, - CORBA::Boolean supports_dynamic_properties = 1); - + CORBA::Boolean supports_dynamic_properties = 1); + CORBA::Boolean evaluate_constraint (TAO_Constraint* root); // Evaluate returns 1 if the offer satisfies the constraints // represented by the the expression tree rooted at <root>, 0 if it @@ -244,12 +244,12 @@ public: // automatically fails. int evaluate_preference (TAO_Constraint* root, - TAO_Literal_Constraint& result); + TAO_Literal_Constraint& result); // The result of the preference evaluation is stored in result. The // method returns 0 upon success, -1 upon failure. - + // = Visitor Methods - + virtual int visit_constraint (TAO_Unary_Constraint* constraint); virtual int visit_with (TAO_Unary_Constraint* unary_with); @@ -257,7 +257,7 @@ public: virtual int visit_max (TAO_Unary_Constraint* unary_max); virtual int visit_first (TAO_Noop_Constraint* noop_first); virtual int visit_random (TAO_Noop_Constraint* noop_random); - + virtual int visit_and (TAO_Binary_Constraint* boolean_and); // Takes the logical and of the results of both operands. Note that // in the case where the left operand returns zero, the result is @@ -270,20 +270,20 @@ public: virtual int visit_not (TAO_Unary_Constraint* unary_not); // Logically negates the value of the operand. - + virtual int visit_exist (TAO_Unary_Constraint* unary_exist); // The property exists if its name is bound to a value in the // <props_> map. virtual int visit_unary_minus (TAO_Unary_Constraint* unary_minus); // Mathematically negates the return value the operand. - + virtual int visit_add (TAO_Binary_Constraint* boolean_add); // Add the results of evaluating the left and right operands. - + virtual int visit_sub (TAO_Binary_Constraint* boolean_sub); // Subtract the results of evaluating the left and right operands. - + virtual int visit_mult (TAO_Binary_Constraint* boolean_mult); // Multiply the results of evaluating the left and right operands. @@ -310,13 +310,13 @@ public: virtual int visit_property (TAO_Property_Constraint* literal); // Copy the value of the property into the result container. - + private: class Operand_Queue : public ACE_Unbounded_Queue <TAO_Literal_Constraint> // = TITLE - // A queue adapter with methods to setting and getting operands + // A queue adapter with methods to setting and getting operands // from the expression evaluation results. { public: @@ -335,13 +335,13 @@ private: void dequeue_operand (void); // Remove an operand from the queue. }; - + void do_the_op (int operation); // Method for performing a arithmetic or comparison operation. - + int visit_bin_op (TAO_Binary_Constraint* op, int operation); // Method for evaluating a binary operation. - + CORBA::Boolean sequence_does_contain (CORBA::Any* sequence, TAO_Literal_Constraint& element); // Determine if sequence contains <element>, a literal of the same @@ -350,13 +350,13 @@ private: TAO_Constraint_Evaluator (const TAO_Constraint_Evaluator&); TAO_Constraint_Evaluator& operator= (const TAO_Constraint_Evaluator&); // Disallow copying. - + TAO_Lookup_Table props_; // The map of property names to their values for a property. TAO_Property_Evaluator prop_eval_; // Utility with which to evaluate the properties of an offer, be - // they dyanmic or static. + // they dyanmic or static. Operand_Queue queue_; // The result of a non_boolean operation. diff --git a/TAO/orbsvcs/orbsvcs/Trader/Locking.h b/TAO/orbsvcs/orbsvcs/Trader/Locking.h index 2476c0aee25..0c79088727e 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Locking.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Locking.h @@ -5,7 +5,7 @@ // // = LIBRARY // Trading -// +// // = FILENAME // Locking.h // @@ -13,7 +13,7 @@ // Marina Spivak <marina@cs.wustl.edu> // Seth Widoff <sbw1@cs.wustl.edu> // Irfan Pyarali <irfan@cs.wustl.edu> -// +// // ========================================================================== #ifndef TAO_LOCKING_H #define TAO_LOCKING_H diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h index 7d117940433..b79ecffe98a 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Database.h @@ -5,13 +5,13 @@ // // = LIBRARY // orbsvcs -// +// // = FILENAME // Offer_Database.h // // = AUTHOR // Seth Widoff <sbw1@cs.wustl.edu> -// +// // ======================================================================== #ifndef TAO_OFFER_DATABASE_H @@ -30,12 +30,12 @@ class TAO_Offer_Database // underlying structure is a map of maps. The first maps maps the // service type name to a map of exported offers. The second map // maps the identifying index for that offer within the service -// types. So a service type name and an index uniquely identifies an +// types. So a service type name and an index uniquely identifies an // exported offer. In fact, when the register export interface // returns a CosTrading::OfferId, it's returning no more than a // simple string concatenation of these two values. In addition to -// all these wonderful things, the TAO_Offer_Database has built-in -// locking, one reader/writer-style lock for modifying the top-level +// all these wonderful things, the TAO_Offer_Database has built-in +// locking, one reader/writer-style lock for modifying the top-level // map and a reader/writer-style for each of the offer // maps. Needless to say the locks are acquired when the // TAO_Offer_Database performs operations on the structures they @@ -52,34 +52,34 @@ public: // Traits typedef TAO_Service_Offer_Iterator<LOCK_TYPE> offer_iterator; - + TAO_Offer_Database (void); // No arg constructor. ~TAO_Offer_Database (void); - + CosTrading::OfferId insert_offer (const char* type, CosTrading::Offer* offer); // Add an offer of type <type> and generate a CosTrading::OfferId // for it. Returns 0 on failure. int remove_offer (const CosTrading::OfferId offer_id, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId)); - + CosTrading::UnknownOfferId)); + CosTrading::Offer* lookup_offer (const CosTrading::OfferId offer_id, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId)); + CosTrading::UnknownOfferId)); // Lookup an offer whose offer_id is <offer_id>, and return // it. Otherwise, throw the appropriate exception. CosTrading::Offer* lookup_offer (const CosTrading::OfferId offer_id, - char*& type_name, - CORBA::Environment& _env) + char*& type_name, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId)); + CosTrading::UnknownOfferId)); // Lookup an offer whose OfferId is <offer_id> and return in // <type_name> the type name of the object. Type name is just a // pointer to a location in offer_id, so DON'T DELETE IT. @@ -88,14 +88,14 @@ public: // Return an iterator that will traverse and return all the offer // ids in the service type map. - struct Offer_Map_Entry + struct Offer_Map_Entry { TAO_Offer_Map* offer_map_; CORBA::ULong counter_; LOCK_TYPE lock_; }; - typedef ACE_Hash_Map_Manager + typedef ACE_Hash_Map_Manager < TAO_String_Hash_Key, Offer_Map_Entry*, @@ -104,41 +104,41 @@ public: Offer_Database; private: - + // The internal id is a pointer here, not only to avoid copying, // since we would only copy on insertion, and we only insert once // --- with an empty Offer_Map_Entry --- but also since most locks // have unimplemented copy constructors. - + CosTrading::Offer* lookup_offer (const char* type, - CORBA::ULong id); + CORBA::ULong id); // Lookup an offer whose type is <type> and id, <id>. Return 0 on - // failure. + // failure. int remove_offer (const char* type, CORBA::ULong id); - // Remove an offers whose id is <offer_id>. Returns 0 on success, -1 - // on failure, and throws a CosTrading::IllegalOfferId if it can't + // Remove an offers whose id is <offer_id>. Returns 0 on success, -1 + // on failure, and throws a CosTrading::IllegalOfferId if it can't // parse the CosTrading::OfferId. static CosTrading::OfferId generate_offer_id (const char *type_name, - CORBA::ULong id); + CORBA::ULong id); // Take in a service type name for the offer the current value of // of the counter and generate an offer id. - + static void parse_offer_id (const CosTrading::OfferId offer_id, - char* &service_type, - CORBA::ULong& id, - CORBA::Environment& _env) + char* &service_type, + CORBA::ULong& id, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::IllegalOfferId)); // Take in a previously generated offer id and return the type - // and id that were used to generate the offer id. + // and id that were used to generate the offer id. // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Offer_Database<LOCK_TYPE> &)) - ACE_UNIMPLEMENTED_FUNC (TAO_Offer_Database (const TAO_Offer_Database<LOCK_TYPE> &)) - + ACE_UNIMPLEMENTED_FUNC (TAO_Offer_Database (const TAO_Offer_Database<LOCK_TYPE> &)) + LOCK_TYPE db_lock_; - + Offer_Database offer_db_; // The protected data structure. }; @@ -149,30 +149,30 @@ class TAO_Service_Offer_Iterator // TAO_Service_Offer_Iterator iterates over the set of exported // offers for a given type. Handily, it takes care of all the // necessary locking, acquiring them in the constructor, and -// releasing them in the destructor. +// releasing them in the destructor. { public: typedef TAO_Offer_Database<LOCK_TYPE> Offer_Database; - + TAO_Service_Offer_Iterator (const char* type, - TAO_Offer_Database<LOCK_TYPE>& offer_database); - + TAO_Offer_Database<LOCK_TYPE>& offer_database); + ~TAO_Service_Offer_Iterator (void); // Release all the locks acquired. - + int has_more_offers (void); // Returns 1 if there are more offers, 0 otherwise. - + CosTrading::OfferId get_id (void); // Get the id for the current offer. - + CosTrading::Offer* get_offer (void); // Returns the next offer in the series. - + void next_offer (void); // Advances the iterator 1. - + private: // Protected constructor. @@ -184,7 +184,7 @@ class TAO_Service_Offer_Iterator TAO_Offer_Map::iterator* offer_iter_; // Iterator over the actual offer map. - + const char* type_; // The name of the type. Used for constructing offer ids. }; diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.h index ee3f93c1f94..f1513e0835c 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators.h @@ -91,9 +91,9 @@ public: TAO_Offer_Iterator (TAO_Offer_Iterator& iter) {} // To satisfy g++'s insane lust for copy constructors... - + TAO_Offer_Iterator& operator=(const TAO_Offer_Iterator&); - + TAO_Property_Filter pfilter_; // The filter through which each returned offer must pass. Used to // strip offers of undesirable properties. diff --git a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators_T.h b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators_T.h index f21c2197e9d..fa74f0acf5e 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators_T.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Offer_Iterators_T.h @@ -5,14 +5,14 @@ // // = LIBRARY // orbsvcs -// +// // = FILENAME // Offer_Iterators_T.h // // = AUTHOR // Marina Spivak <marina@cs.wustl.edu> // Seth Widoff <sbw1@cs.wustl.edu> -// +// // ======================================================================== #ifndef TAO_REGISTER_OFFER_ITERATOR_H @@ -31,36 +31,36 @@ class TAO_Register_Offer_Iterator : public TAO_Offer_Iterator // = DESCRIPTION // Stores ids of offers to be iterated over. Before returning // an offer, checks if the offer is still there (since it may - // have been removed by the Register). + // have been removed by the Register). public: // = Initialization and termination methods. TAO_Register_Offer_Iterator (TAO_Offer_Database<MAP_LOCK_TYPE> &db, - const TAO_Property_Filter& pfilter); - // Takes service type and trader reference in order to + const TAO_Property_Filter& pfilter); + // Takes service type and trader reference in order to // later locate offers using their ids. virtual ~TAO_Register_Offer_Iterator (void); // destructor. - virtual CORBA::Boolean next_n (CORBA::ULong n, - CosTrading::OfferSeq_out offers, - CORBA::Environment& _env) + virtual CORBA::Boolean next_n (CORBA::ULong n, + CosTrading::OfferSeq_out offers, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)); // Deposit at maximum n offers into the return sequence and return 1, // or return 0 if the iterator is done and no offers are returned. - - virtual CORBA::ULong max_left (CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::UnknownMaxLeft)); - // Throws CosTrading::UnknownMaxLeft since with the presence of - // "Register" functionality, the iterator cannot guarantee that + + virtual CORBA::ULong max_left (CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::UnknownMaxLeft)); + // Throws CosTrading::UnknownMaxLeft since with the presence of + // "Register" functionality, the iterator cannot guarantee that // the trader will have all the offers it has now when the time // to return them comes. void add_offer (CosTrading::OfferId id, - const CosTrading::Offer* offer); + const CosTrading::Offer* offer); // Add an offer the iterator should iterate over. private: diff --git a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h index 6e6aabcaee2..1be09f077cc 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Service_Type_Repository.h @@ -2,17 +2,17 @@ // ======================================================================== // $Id$ -// +// // = LIBRARY // orbsvcs -// +// // = FILENAME // Service_Type_Repository.h // // = AUTHOR // Marina Spivak <marina@cs.wustl.edu> // Seth Widoff <sbw1@cs.wustl.edu> -// +// // ======================================================================== #ifndef TAO_SERVICE_TYPE_REPOSITORY_H @@ -25,36 +25,36 @@ class TAO_ORBSVCS_Export TAO_Service_Type_Repository : // // = TITLE // This class implements CosTradingRepos::ServiceTypeRepository - // IDL interface. + // IDL interface. { public: - + TAO_Service_Type_Repository (ACE_Lock* lock = 0); // Parameterize the Service_Type_Repository with a lock to serialize // access to the type repository map. A reader/writer lock is - // probably best. The Service_Type_Repository assumes control of the + // probably best. The Service_Type_Repository assumes control of the // lock. - + ~TAO_Service_Type_Repository (void); - - virtual CosTradingRepos::ServiceTypeRepository::IncarnationNumber - incarnation (CORBA::Environment& _env); - - virtual CosTradingRepos::ServiceTypeRepository::IncarnationNumber - add_type (const char * name, - const char * if_name, - const CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, - const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, - CORBA::Environment& _env) + + virtual CosTradingRepos::ServiceTypeRepository::IncarnationNumber + incarnation (CORBA::Environment& _env); + + virtual CosTradingRepos::ServiceTypeRepository::IncarnationNumber + add_type (const char * name, + const char * if_name, + const CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, + const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, - CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); // BEGIN SPEC // The add_type operation enables the creation of new service types @@ -96,16 +96,16 @@ public: // ServiceTypeNames in "super_types" does not exist, then the // CosTrading::UnknownServiceType exception is raised. ° If the same // service type name is included two or more times in this - // parameter, the DuplicateServiceTypeName exception is raised. + // parameter, the DuplicateServiceTypeName exception is raised. // END SPEC - + virtual void remove_type (const char * name, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::HasSubTypes)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::HasSubTypes)); // BEGIN SPEC // The remove_type operation removes the named type from the service @@ -114,12 +114,12 @@ public: // does not exist within the repository, then the // CosTrading::UnknownServiceType exception is raised. ° If "name" // has a service type which has been derived from it, then the - // HasSubTypes exception is raised. + // HasSubTypes exception is raised. // END SPEC - - virtual CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq* + + virtual CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq* list_types (const CosTradingRepos::ServiceTypeRepository::SpecifiedServiceTypes& which_types, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)); // BEGIN SPEC @@ -130,29 +130,29 @@ public: // added/modified since a particular incarnation number The names of // the requested types are returned by the operation for subsequent // querying via the describe_type or the fully_describe_type - // operation. - // END SPEC - + // operation. + // END SPEC + virtual CosTradingRepos::ServiceTypeRepository::TypeStruct* describe_type (const char * name, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)); // BEGIN SPEC // The describe_type operation permits a client to obtain the // details for a particular service type. ° If "name" is malformed, // then the CosTrading::IllegalServiceType exception is raised. ° If // "name" does not exist within the repository, then the - // CosTrading::UnknownServiceType exception is raised. + // CosTrading::UnknownServiceType exception is raised. // END SPEC - - virtual CosTradingRepos::ServiceTypeRepository::TypeStruct* + + virtual CosTradingRepos::ServiceTypeRepository::TypeStruct* fully_describe_type (const char * name, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType)); + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)); // BEGIN SPEC // The fully_describe_type operation permits a client to obtain the // details for a particular service type. The property sequence @@ -162,15 +162,15 @@ public: // transitive closure of the super type relation. ° If "name" is // malformed, then the CosTrading::IllegalServiceType exception is // raised. ° If "name" does not exist within the repository, then - // the CosTrading::UnknownServiceType exception is raised. - // END SPEC + // the CosTrading::UnknownServiceType exception is raised. + // END SPEC virtual void mask_type (const char * name, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::AlreadyMasked)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::AlreadyMasked)); // BEGIN SPEC // The mask_type operation permits the deprecation of a particular // type (i.e., after being masked, exporters will no longer be able @@ -181,15 +181,15 @@ public: // does not exist within the repository, then the // CosTrading::UnknownServiceType exception is raised. ° If the type // is currently in the masked state, then the AlreadyMasked - // exception is raised. - // END SPEC - + // exception is raised. + // END SPEC + virtual void unmask_type (const char * name, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::NotMasked)); + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::NotMasked)); // BEGIN SPEC // The unmask_type undeprecates a type (i.e., after being unmasked, // exporters will be able to resume advertisement of offers of that @@ -198,21 +198,21 @@ public: // does not exist within the repository, then the // CosTrading::UnknownServiceType exception is raised. ° If the type // is not currently in the masked state, then the NotMasked - // exception is raised. + // exception is raised. // END SPEC private: - + struct Type_Info { // storage structure for information pertinent to the type. - CosTradingRepos::ServiceTypeRepository::TypeStruct type_struct_; + CosTradingRepos::ServiceTypeRepository::TypeStruct type_struct_; // standard type info. - + CORBA::Boolean has_subtypes_; // names of subtypes. }; - + typedef ACE_Hash_Map_Manager < TAO_String_Hash_Key, @@ -220,7 +220,7 @@ private: ACE_Null_Mutex > Prop_Map; - + typedef ACE_Hash_Map_Manager < TAO_String_Hash_Key, @@ -230,59 +230,59 @@ private: Service_Type_Map; void fully_describe_type_i (const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct, - CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, - CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types); + CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, + CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types); // Build a sequence aggregating the property names from all // supertypes of the type, and a sequence representing the // transitive closure of the super type relation. void collect_inheritance_hierarchy (const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct, TAO_String_Queue& target); - + void validate_properties (Prop_Map& prop_map, - const CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, - CORBA::Environment& _env) + const CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName)); + CosTrading::DuplicatePropertyName)); // Confirm that the properties in props have valid names, and aren't // duplicated. Cram those properties into the prop_map. - + void validate_supertypes (Service_Type_Map& super_map, - const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, - CORBA::Environment& _env) + const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::DuplicatePropertyName)); - // Confirm that the each super type exists, and cram them into super_map. - + CosTrading::UnknownServiceType, + CosTrading::DuplicatePropertyName)); + // Confirm that the each super type exists, and cram them into super_map. + void validate_inheritance (Prop_Map& prop_map, - const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, - CORBA::Environment& _env) + const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition)); // Ensure that properties of a super_type aren't having their types // or retstrictions redefined. // void validate_interface (const char* if_name, - // Service_Type_Map& super_map, - // CORBA::Environment& _env) + // Service_Type_Map& super_map, + // CORBA::Environment& _env) // TAO_THROW_SPEC ((CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch)); // Ensure that the interface type derives from its superclasses'. - + void update_type_map (const char* name, - const char * if_name, - const CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, - const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, - Prop_Map& prop_map, - Service_Type_Map& super_map); + const char * if_name, + const CosTradingRepos::ServiceTypeRepository::PropStructSeq& props, + const CosTradingRepos::ServiceTypeRepository::ServiceTypeNameSeq& super_types, + Prop_Map& prop_map, + Service_Type_Map& super_map); // Update the type map with the information contained in the // TypeStruct, prop_map, and super_map. TAO_Service_Type_Repository (const TAO_Service_Type_Repository&); TAO_Service_Type_Repository& operator= (const TAO_Service_Type_Repository&); - + ACE_Lock* lock_; // Lock with which to serialize access to the service type map. - + Service_Type_Map type_map_; // Stores information for each service type in the repository. // This is a mapping from service type name to a Type_Info struct diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader.h b/TAO/orbsvcs/orbsvcs/Trader/Trader.h index 050978a3461..03dae79a92c 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader.h @@ -30,6 +30,11 @@ #define TAO_TRADER_BASE_H #include "ace/Hash_Map_Manager.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Containers.h" #include "orbsvcs/CosTradingS.h" diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h index 58ed40d5945..7ee9754254a 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Interfaces.h @@ -5,7 +5,7 @@ // // = LIBRARY // orbsvcs -// +// // = FILENAME // Trader_Interfaces.h // @@ -13,7 +13,7 @@ // Marina Spivak <marina@cs.wustl.edu> // Seth Widoff <sbw1@cs.wustl.edu> // Irfan Pyarali <irfan@cs.wustl.edu> -// +// // ======================================================================== #ifndef TAO_TRADER_INTERFACES_H @@ -45,41 +45,41 @@ class TAO_Lookup : // // = TITLE // This class implements CosTrading::Lookup IDL interface. -{ +{ public: - + TAO_Lookup (TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader); ~TAO_Lookup (void); - + virtual void query (const char *type, - const char *constr, - const char *pref, - const CosTrading::PolicySeq& policies, - const CosTrading::Lookup::SpecifiedProps& desired_props, - CORBA::ULong how_many, - CosTrading::OfferSeq_out offers, - CosTrading::OfferIterator_out offer_itr, - CosTrading::PolicyNameSeq_out limits_applied, - CORBA::Environment& env) + const char *constr, + const char *pref, + const CosTrading::PolicySeq& policies, + const CosTrading::Lookup::SpecifiedProps& desired_props, + CORBA::ULong how_many, + CosTrading::OfferSeq_out offers, + CosTrading::OfferIterator_out offer_itr, + CosTrading::PolicyNameSeq_out limits_applied, + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Lookup::IllegalPreference, - CosTrading::Lookup::IllegalPolicyName, - CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); // BEGIN SPEC // The query operation is the means by which an object can obtain // references to other objects that provide services meeting its // requirements. - + // The "type" parameter conveys the required service type. It is key // to the central purpose of trading: to perform an introduction for // future type safe interactions between importer and exporter. By @@ -94,7 +94,7 @@ public: // query for the "type" is also a well-formed query with respect to // any subtypes. However, if the importer specifies the policy of // exact_type_match = TRUE, then only offers with the exact (no - // subtype) service type requested are returned. + // subtype) service type requested are returned. // The constraint "constr" is the means by which the importer states // those requirements of a service that are not captured in the @@ -122,7 +122,7 @@ public: // implementation of the trader. However, some names are // standardized where they effect the interpretation of other // parameters or where they may impact linking and federation of - // traders. + // traders. // The "desired_props" parameter defines the set of properties // describing returned offers that are to be returned with the @@ -134,7 +134,7 @@ public: // The desired_props parameter does not affect whether or not a // service offer is returned. To avoid "missing" desired properties, // the importer should specify "exists prop_name" in the - // constraint. + // constraint. // The returned offers are passed back in one of two ways (or a // combination of both). °The "offers" return result conveys a list @@ -143,7 +143,7 @@ public: // how many offers are to be returned via the "offers" result, any // remaining offers are available via the iterator interface. If the // "how_many" exceeds the number of offers to be returned, then the - // "offer_itr" will be nil. + // "offer_itr" will be nil. // If any cardinality or other limits were applied by one or more // traders in responding to a particular query, then the @@ -153,31 +153,31 @@ public: // concatenated onto the names of limits applied locally and // returned. // END SPEC - + private: TAO_Offer_Iterator* create_offer_iterator (const TAO_Property_Filter&); // Factory method for creating an appropriate Offer Iterator based - // on the presence of the Register Interface. - + // on the presence of the Register Interface. + void lookup_all_subtypes (const char* type, - CosTradingRepos::ServiceTypeRepository::IncarnationNumber& inc_num, + CosTradingRepos::ServiceTypeRepository::IncarnationNumber& inc_num, TAO_Offer_Database<MAP_LOCK_TYPE>& offer_database, - CosTradingRepos::ServiceTypeRepository_ptr rep, - TAO_Constraint_Interpreter& constr_inter, - TAO_Preference_Interpreter& pref_inter, - TAO_Offer_Filter& offer_filter); + CosTradingRepos::ServiceTypeRepository_ptr rep, + TAO_Constraint_Interpreter& constr_inter, + TAO_Preference_Interpreter& pref_inter, + TAO_Offer_Filter& offer_filter); // Traverse the type hierarchy to pull the matching offers from all // subtypes of the root type. - + void lookup_one_type (const char* type, - TAO_Offer_Database<MAP_LOCK_TYPE>& offer_database, - TAO_Constraint_Interpreter& constr_inter, - TAO_Preference_Interpreter& pref_inter, - TAO_Offer_Filter& offer_filter); + TAO_Offer_Database<MAP_LOCK_TYPE>& offer_database, + TAO_Constraint_Interpreter& constr_inter, + TAO_Preference_Interpreter& pref_inter, + TAO_Offer_Filter& offer_filter); // Check if offers of a type fit the constraints and order them // according to the preferences submitted. - + int fill_receptacles (const char* type, CORBA::ULong how_many, const CosTrading::Lookup::SpecifiedProps& desired_props, @@ -187,7 +187,7 @@ private: CosTrading::OfferIterator_ptr& offer_itr, CORBA::Environment& env) TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName)); + CosTrading::DuplicatePropertyName)); // This method takes the list of ordered offers and places a number // of them in the sequence of returned offers and the rest into thr // iterator. In addition, fill_receptacles uses the @@ -196,67 +196,67 @@ private: void forward_query (const char* next_hop, const char *type, - const char *constr, - const char *pref, + const char *constr, + const char *pref, const CosTrading::PolicySeq& policy_seq, - const CosTrading::Lookup::SpecifiedProps& desired_props, - CORBA::ULong how_many, - CosTrading::OfferSeq_out offers, - CosTrading::OfferIterator_out offer_itr, - CosTrading::PolicyNameSeq_out limits_applied, - CORBA::Environment& env) + const CosTrading::Lookup::SpecifiedProps& desired_props, + CORBA::ULong how_many, + CosTrading::OfferSeq_out offers, + CosTrading::OfferIterator_out offer_itr, + CosTrading::PolicyNameSeq_out limits_applied, + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Lookup::IllegalPreference, - CosTrading::Lookup::IllegalPolicyName, - CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); - // If a starting_trader policy was specfied, foward the query to the + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); + // If a starting_trader policy was specfied, foward the query to the // next link in the sequence. - + CORBA::Boolean retrieve_links (TAO_Policies& policies, - CORBA::ULong offer_returned, - CosTrading::LinkNameSeq_out links, - CORBA::Environment& _env) + CORBA::ULong offer_returned, + CosTrading::LinkNameSeq_out links, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Lookup::PolicyTypeMismatch)); + CosTrading::Lookup::PolicyTypeMismatch)); // Assemble a sequence of links that the federate_query method - // should follow. Use the starting_trader policy, if one's provided, + // should follow. Use the starting_trader policy, if one's provided, // otherwise use the Link interface to determine which of the // registered links should be followed in this query. - + void federated_query (const CosTrading::LinkNameSeq& links, const TAO_Policies& policies, const CosTrading::Admin::OctetSeq& request_id, TAO_Preference_Interpreter& pref_inter, - const char *type, - const char *constr, - const char *pref, - const CosTrading::Lookup::SpecifiedProps& desired_props, - CORBA::ULong how_many, - CosTrading::OfferSeq& offers, - CosTrading::OfferIterator_ptr& offer_itr, - CosTrading::PolicyNameSeq& limits_applied, - CORBA::Environment& env) + const char *type, + const char *constr, + const char *pref, + const CosTrading::Lookup::SpecifiedProps& desired_props, + CORBA::ULong how_many, + CosTrading::OfferSeq& offers, + CosTrading::OfferIterator_ptr& offer_itr, + CosTrading::PolicyNameSeq& limits_applied, + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Lookup::IllegalPreference, - CosTrading::Lookup::IllegalPolicyName, - CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); // Perform and pass on a query over a set of links. Merge the // results of the federated queries into a single set of results - // suitable for returning to the user. + // suitable for returning to the user. void order_merged_sequence (TAO_Preference_Interpreter& pref_inter, CosTrading::OfferSeq& offers); @@ -267,20 +267,20 @@ private: CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, CosTrading::Lookup::PolicyTypeMismatch)); - + // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Lookup<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) ACE_UNIMPLEMENTED_FUNC (TAO_Lookup (const TAO_Lookup<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) const unsigned int IDS_SAVED; - + TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader_; // A reference to the trader for obtaining offer maps. - + typedef ACE_Unbounded_Queue<CosTrading::Admin::OctetSeq*> Request_Ids; - + Request_Ids request_ids_; - // A list of recent request_id_stems + // A list of recent request_id_stems TRADER_LOCK_TYPE lock_; // Lock to secure the set of request ids. @@ -305,20 +305,20 @@ public: virtual ~TAO_Register (void); - virtual CosTrading::OfferId export (CORBA::Object_ptr reference, - const char *type, - const CosTrading::PropertySeq& properties, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); + virtual CosTrading::OfferId export (CORBA::Object_ptr reference, + const char *type, + const CosTrading::PropertySeq& properties, + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); // BEGIN SPEC // The export operation is the means by which a service is @@ -363,7 +363,7 @@ public: // If the type of any of the property values is not the // same as the declared type (declared in the service type), then a - // PropertyTypeMismatch exception is raised. + // PropertyTypeMismatch exception is raised. // ° If an attempt is made to assign a dynamic property value to a // readonly property, then the ReadonlyDynamicProperty exception is @@ -373,12 +373,12 @@ public: // properties with the same property name are included in this // parameter, the DuplicatePropertyName exception is raised. // END SPEC - + virtual void withdraw (const char *id, CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)); // BEGIN SPEC // The withdraw operation removes the service offer from the trader @@ -390,17 +390,17 @@ public: // "id" is legal but there is no offer within the trader with that // "id," then an UnknownOfferId exception is raised. ° If the "id" // identifies a proxy offer rather than an ordinary offer, then a - // ProxyOfferId exception is raised. + // ProxyOfferId exception is raised. // END SPEC - + virtual CosTrading::Register::OfferInfo* describe (const char * id, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId)); - + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)); + // BEGIN SPEC // The describe operation returns the information about an offered // service that is held by the trader. It comprises the "reference" @@ -412,25 +412,25 @@ public: // raised. ° If the "id" is legal but there is no offer within the // trader with that "id," then an UnknownOfferId exception is // raised. ° If the "id" identifies a proxy offer rather than an - // ordinary offer, then a ProxyOfferId exception is raised. + // ordinary offer, then a ProxyOfferId exception is raised. // END SPEC - - virtual void modify (const char * id, - const CosTrading::PropertyNameSeq& del_list, - const CosTrading::PropertySeq& modify_list, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)); + + virtual void modify (const char * id, + const CosTrading::PropertyNameSeq& del_list, + const CosTrading::PropertySeq& modify_list, + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::NotImplemented, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId, + CosTrading::IllegalPropertyName, + CosTrading::Register::UnknownPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::Register::MandatoryProperty, + CosTrading::Register::ReadonlyProperty, + CosTrading::DuplicatePropertyName)); // BEGIN SPEC // The modify operation is used to change the description of a @@ -482,18 +482,18 @@ public: // DuplicatePropertyName exception is raised. // The NotImplemented exception shall be raised if and only if the - // supports_modifiable_properties attribute yields FALSE. + // supports_modifiable_properties attribute yields FALSE. // END SPEC - - virtual void withdraw_using_constraint (const char *type, - const char *constr, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Register::NoMatchingOffers)); - + + virtual void withdraw_using_constraint (const char *type, + const char *constr, + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Register::NoMatchingOffers)); + // BEGIN SPEC // The withdraw_using_constraint operation withdraws a set of offers // from within a single trader. This set is identified in the same @@ -507,24 +507,24 @@ public: // service types, then an IllegalServiceType exception is raised. ° // If the "type" is correct syntactically but is not recognized as a // service type by the trader, then an UnknownServiceType exception - // is raised. + // is raised. // The constraint "constr" is the means by which the client // restricts the set of offers to those that are intended for // withdrawal. ° If "constr" does not obey the syntax rules for a // constraint then an IllegalConstraint exception is raised. ° If // the constraint fails to match with any offer of the specified - // service type, then a NoMatchingOffers exception is raised. + // service type, then a NoMatchingOffers exception is raised. // END SPEC - + virtual CosTrading::Register_ptr resolve (const CosTrading::TraderName &name, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::IllegalTraderName, - CosTrading::Register::UnknownTraderName, - CosTrading::Register::RegisterNotSupported)); - + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::IllegalTraderName, + CosTrading::Register::UnknownTraderName, + CosTrading::Register::RegisterNotSupported)); + // BEGIN SPEC // This operation is used to resolve a context relative name for // another trader. In particular, it is used when exporting to a @@ -549,21 +549,21 @@ public: // END SPEC protected: - + void validate_properties (const char* type, - const CosTradingRepos::ServiceTypeRepository::TypeStruct* type_struct, - const CosTrading::PropertySeq& properties, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); + const CosTradingRepos::ServiceTypeRepository::TypeStruct* type_struct, + const CosTrading::PropertySeq& properties, + CORBA::Environment& _env) + TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Register<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) ACE_UNIMPLEMENTED_FUNC (TAO_Register (const TAO_Register<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) - + private: TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader_; @@ -574,7 +574,7 @@ public: // ************************************************************* template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE> -class TAO_Admin : +class TAO_Admin : public TAO_Trader_Components <POA_CosTrading::Admin>, public TAO_Support_Attributes <POA_CosTrading::Admin>, public TAO_Import_Attributes <POA_CosTrading::Admin>, @@ -582,9 +582,9 @@ class TAO_Admin : // // = TITLE // This class implements CosTrading::Admin IDL interface. -// +// // = DESCRIPTION (FROM SPEC) -// +// // The admin interface enables the values of the trader attributes to // be read and written. All attributes are defined as readonly in // either SupportAttributes, ImportAttributes, LinkAttributes, or @@ -598,7 +598,7 @@ class TAO_Admin : // operations in the proxy interface. However, in this case, it does // have the effect of making any proxy offers exported via the proxy // interface for that trader unavailable to satisfy queries on that -// trader's lookup interface. +// trader's lookup interface. { public: @@ -609,95 +609,95 @@ public: // = Importing Parameters (used by the Lookup Interface) virtual CORBA::ULong set_def_search_card (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::ULong set_max_search_card (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); // search card is the cardinality of the offers searched for - // constraint compliance. + // constraint compliance. virtual CORBA::ULong set_def_match_card (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::ULong set_max_match_card (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); // match card is the cardinality of offers found compliant with the - // constraints. + // constraints. virtual CORBA::ULong set_def_return_card (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::ULong set_max_return_card (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); // return card is the cardinality of the offers returned from // Lookup. virtual CORBA::ULong set_max_list (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Boolean set_supports_modifiable_properties (CORBA::Boolean value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Boolean set_supports_dynamic_properties (CORBA::Boolean value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::Boolean set_supports_proxy_offers (CORBA::Boolean value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); // Types of offers available for consideration. Ween out those // offers with modifiable properties - + // = Link Interface parameters virtual CORBA::ULong set_def_hop_count (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::ULong set_max_hop_count (CORBA::ULong value, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CosTrading::FollowOption set_def_follow_policy (CosTrading::FollowOption policy, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CosTrading::FollowOption set_max_follow_policy (CosTrading::FollowOption policy, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CosTrading::FollowOption set_max_link_follow_policy (CosTrading::FollowOption policy, - CORBA::Environment &env) + CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); // = Set Type Repository - + virtual CosTrading::TypeRepository_ptr set_type_repos (CosTrading::TypeRepository_ptr repository, - CORBA::Environment& env) + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CosTrading::Admin::OctetSeq* request_id_stem (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - + virtual CosTrading::Admin::OctetSeq* set_request_id_stem (const CosTrading::Admin::OctetSeq& stem, - CORBA::Environment& env) + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual void list_offers (CORBA::ULong how_many, - CosTrading::OfferIdSeq_out ids, - CosTrading::OfferIdIterator_out id_itr, - CORBA::Environment& env) + CosTrading::OfferIdSeq_out ids, + CosTrading::OfferIdIterator_out id_itr, + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::NotImplemented)); + CosTrading::NotImplemented)); // BEGIN SPEC @@ -715,27 +715,27 @@ public: // identifiers are to be returned via the "ids" result; any // remaining are available via the iterator interface. If the // "how_many" exceeds the number of offers held in the trader, then - // the "id_itr" is nil. + // the "id_itr" is nil. // END SPEC virtual void list_proxies (CORBA::ULong how_many, - CosTrading::OfferIdSeq_out ids, - CosTrading::OfferIdIterator_out id_itr, - CORBA::Environment& env) + CosTrading::OfferIdSeq_out ids, + CosTrading::OfferIdIterator_out id_itr, + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::NotImplemented)); + CosTrading::NotImplemented)); private: // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Admin<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) ACE_UNIMPLEMENTED_FUNC (TAO_Admin (const TAO_Admin<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) - + TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader_; - + CosTrading::Admin::OctetSeq stem_id_; // Unique prefix to create a sequence number space. - + CORBA::ULong sequence_number_; // Current sequence number. @@ -747,7 +747,7 @@ private: // ************************************************************* template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE> -class TAO_Link : +class TAO_Link : public TAO_Trader_Components <POA_CosTrading::Link>, public TAO_Support_Attributes <POA_CosTrading::Link>, public TAO_Link_Attributes <POA_CosTrading::Link> @@ -757,22 +757,22 @@ public: TAO_Link (TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader); ~TAO_Link (void); - - virtual void add_link (const char *name, - CosTrading::Lookup_ptr target, - CosTrading::FollowOption def_pass_on_follow_rule, - CosTrading::FollowOption limiting_follow_rule, - CORBA::Environment& _env) + + virtual void add_link (const char *name, + CosTrading::Lookup_ptr target, + CosTrading::FollowOption def_pass_on_follow_rule, + CosTrading::FollowOption limiting_follow_rule, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Link::IllegalLinkName, - CosTrading::Link::DuplicateLinkName, - CosTrading::InvalidLookupRef, - CosTrading::Link::DefaultFollowTooPermissive, - CosTrading::Link::LimitingFollowTooPermissive)); + CosTrading::Link::IllegalLinkName, + CosTrading::Link::DuplicateLinkName, + CosTrading::InvalidLookupRef, + CosTrading::Link::DefaultFollowTooPermissive, + CosTrading::Link::LimitingFollowTooPermissive)); // BEGIN SPEC // The add_link operation allows a trader subsequently to use the // service of another trader in the performance of its own trading - // service operations. + // service operations. // The "name" parameter is used in subsequent link management // operations to identify the intended link. If the parameter is not @@ -807,14 +807,14 @@ public: // trader's "max_link_follow_policy" later in the life of a link, as // it is possible that the trader could set its // "max_link_follow_policy" to a more restrictive value after the - // creation of the link. + // creation of the link. // END SPEC - + virtual void remove_link (const char *name, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Link::IllegalLinkName, - CosTrading::Link::UnknownLinkName)); + CosTrading::Link::IllegalLinkName, + CosTrading::Link::UnknownLinkName)); // BEGIN SPEC // The remove_link operation removes all knowledge of the target @@ -824,14 +824,14 @@ public: // The "name" parameter identifies the link to be removed. The // exception IllegalLinkName is raised if the link is formed poorly // and the UnknownLinkName exception is raised if the named link is - // not in the trader. + // not in the trader. // END SPEC - + virtual CosTrading::Link::LinkInfo* describe_link (const char *name, - CORBA::Environment&) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Link::IllegalLinkName, - CosTrading::Link::UnknownLinkName)); + CORBA::Environment&) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::Link::IllegalLinkName, + CosTrading::Link::UnknownLinkName)); // BEGIN SPEC // The describe_link operation returns information on a link held in @@ -853,9 +853,9 @@ public: // Operation" on page 16-45, most implementations will opt for // determining the Register interface when add_link is called and // storing that information statically with the rest of the link - // state. + // state. // END SPEC - + virtual CosTrading::LinkNameSeq* list_links (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)); @@ -863,17 +863,17 @@ public: // The list_links operation returns a list of the names of all // trading links within the trader. The names can be used // subsequently for other management operations, such as - // describe_link or remove_link. + // describe_link or remove_link. // END SPEC - - virtual void modify_link (const char *name, - CosTrading::FollowOption def_pass_on_follow_rule, - CosTrading::FollowOption limiting_follow_rule, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTrading::Link::IllegalLinkName, - CosTrading::Link::UnknownLinkName, - CosTrading::Link::DefaultFollowTooPermissive, - CosTrading::Link::LimitingFollowTooPermissive)); + + virtual void modify_link (const char *name, + CosTrading::FollowOption def_pass_on_follow_rule, + CosTrading::FollowOption limiting_follow_rule, + CORBA::Environment& _env) + TAO_THROW_SPEC ((CosTrading::Link::IllegalLinkName, + CosTrading::Link::UnknownLinkName, + CosTrading::Link::DefaultFollowTooPermissive, + CosTrading::Link::LimitingFollowTooPermissive)); // BEGIN SPEC // The modify_link operation is used to change the existing link @@ -895,15 +895,15 @@ public: // The "limiting_follow_rule" parameter specifies the new limit for // the follow behavior of this link. The exception // LimitingFollowTooPermissive is raised if the value exceeds the - // current "max_link_follow_policy" of the trader. + // current "max_link_follow_policy" of the trader. // END SPEC - + private: // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Link<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) ACE_UNIMPLEMENTED_FUNC (TAO_Link (const TAO_Link<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) - + typedef ACE_Hash_Map_Manager < TAO_String_Hash_Key, @@ -911,11 +911,11 @@ private: MAP_LOCK_TYPE > Links; - + Links links_; // The collection of link connecting this trader to others in the - // federation. - + // federation. + TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &trader_; }; @@ -924,7 +924,7 @@ private: // ************************************************************* template <class TRADER_LOCK_TYPE, class MAP_LOCK_TYPE> -class TAO_Proxy : +class TAO_Proxy : public TAO_Trader_Components <POA_CosTrading::Proxy>, public TAO_Support_Attributes <POA_CosTrading::Proxy> { @@ -935,56 +935,56 @@ public: ~TAO_Proxy (void); virtual CosTrading::OfferId - export_proxy (CosTrading::Lookup_ptr target, - const char *type, - const CosTrading::PropertySeq& properties, - CORBA::Boolean if_match_all, - const char * recipe, - const CosTrading::PolicySeq& policies_to_pass_on, - CORBA::Environment& _env) + export_proxy (CosTrading::Lookup_ptr target, + const char *type, + const CosTrading::PropertySeq& properties, + CORBA::Boolean if_match_all, + const char * recipe, + const CosTrading::PolicySeq& policies_to_pass_on, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::InvalidLookupRef, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::Proxy::IllegalRecipe, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::InvalidLookupRef, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::Proxy::IllegalRecipe, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); virtual void withdraw_proxy (const char *id, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Proxy::NotProxyOfferId)); + CORBA::Environment& _env) + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Proxy::NotProxyOfferId)); virtual CosTrading::Proxy::ProxyInfo * describe_proxy (const char *id, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Proxy::NotProxyOfferId)); + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Proxy::NotProxyOfferId)); - // = CosTrading::TraderComponents methods. + // = CosTrading::TraderComponents methods. virtual void list_proxies (CORBA::ULong how_many, - CosTrading::OfferIdSeq*& ids, - CosTrading::OfferIdIterator_ptr& id_itr, - CORBA::Environment& env) + CosTrading::OfferIdSeq*& ids, + CosTrading::OfferIdIterator_ptr& id_itr, + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::NotImplemented)); - + CosTrading::NotImplemented)); + private: // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Proxy<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) ACE_UNIMPLEMENTED_FUNC (TAO_Proxy (const TAO_Proxy<TRADER_LOCK_TYPE,MAP_LOCK_TYPE> &)) - + TAO_Trader<TRADER_LOCK_TYPE,MAP_LOCK_TYPE>& trader_; }; diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h index 0e873606bb9..3d640c2ef4d 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_T.h @@ -2,10 +2,10 @@ // ======================================================================== // $Id$ -// +// // = LIBRARY // orbsvcs -// +// // = FILENAME // Trader.h // @@ -13,7 +13,7 @@ // Marina Spivak <marina@cs.wustl.edu> // Seth Widoff <sbw1@cs.wustl.edu> // Irfan Pyarali <irfan@cs.wustl.edu> -// +// // ======================================================================== #ifndef TAO_TRADER_H @@ -35,8 +35,8 @@ class TAO_Trader : public TAO_Trader_Base // // = DESCRIPTION // TAO_Trader contains all the components that together represent - // a single trader. Based on its constructor arguments, - // TAO_Trader creates instances of appropriate interface + // a single trader. Based on its constructor arguments, + // TAO_Trader creates instances of appropriate interface // implementations as well as instances of objects common to // more than one interface (offers, attributes, etc.). // TAO_Trader also enforces the proper order on all @@ -44,46 +44,46 @@ class TAO_Trader : public TAO_Trader_Base // creates appropriate components, holds everything together, // and enforces order. TAO_Trader is parameterized by two types // of locks: one for its service service offers, one for its - // state (configuration). -{ + // state (configuration). +{ public: - // The desired combination of interfaces to be passed to the + // The desired combination of interfaces to be passed to the // TAO_Trader constructor. typedef TAO_Offer_Database<MAP_LOCK_TYPE> Offer_Database; // Offer Database Trait. TAO_Trader (Trader_Components components = LOOKUP); - // Constructor which based on its arguments will create + // Constructor which based on its arguments will create // a particular type of trader (e.g. Query trader, Simple trader, etc.) // The argument is a bitwise OR of desired Trader_Components as listed // in enumerated type above. virtual ~TAO_Trader (void); // destructor. - + Offer_Database& offer_database (void); // Accessor for the structure with all the service offers. ACE_Lock &lock (void); // returns the trader - -protected: - + +protected: + typedef TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE> TRADER_SELF; - - Offer_Database offer_database_; + + Offer_Database offer_database_; ACE_Lock_Adapter<TRADER_LOCK_TYPE> lock_; // lock that guards the state of the trader (its configuration). enum { LOOKUP_IF, REGISTER_IF, ADMIN_IF, PROXY_IF, LINK_IF }; - + PortableServer::ServantBase* ifs_[5]; - + private: - + // = Disallow these operations. ACE_UNIMPLEMENTED_FUNC (void operator= (const TAO_Trader<TRADER_LOCK_TYPE, MAP_LOCK_TYPE> &)) }; @@ -98,35 +98,35 @@ class TAO_Trader_Components : public virtual IF public: TAO_Trader_Components (const TAO_Trading_Components_i& comps); - - // = CosTrading::TraderComponents methods. + + // = CosTrading::TraderComponents methods. virtual CosTrading::Lookup_ptr lookup_if (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); // Returns an object reference to the Lookup interface of the trader. // Returns nil if the trader does not support Lookup interface. - + virtual CosTrading::Register_ptr register_if (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); // Returns object reference for the Register interface of the trader. // Returns nil if the trader does not support Register interface. - + virtual CosTrading::Link_ptr link_if (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException)); + TAO_THROW_SPEC ((CORBA::SystemException)); // Returns object reference for the Link interface of the trader. // Returns nil if the trader does not support Link interface. virtual CosTrading::Proxy_ptr proxy_if (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); // Returns object reference to the Proxy interface of the trader. - // Returns nil if the trader does not support Proxy interface. - + // Returns nil if the trader does not support Proxy interface. + virtual CosTrading::Admin_ptr admin_if (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); // Returns object reference for the Admin interface of the trader. // Returns nil if the trader does not support Admin interface. private: - + const TAO_Trading_Components_i& comps_; }; @@ -138,19 +138,19 @@ public: TAO_Support_Attributes (const TAO_Support_Attributes_i& attrs); // = CosTrading::SupportAttributes methods. - + virtual CORBA::Boolean supports_modifiable_properties (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Boolean supports_dynamic_properties (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - + virtual CORBA::Boolean supports_proxy_offers (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - + virtual CosTrading::TypeRepository_ptr type_repos (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - + private: const TAO_Support_Attributes_i& attrs_; @@ -164,7 +164,7 @@ public: TAO_Import_Attributes (const TAO_Import_Attributes_i& attrs); // = CosTrading::ImportAttributes methods. - + virtual CORBA::ULong def_search_card (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); @@ -172,8 +172,8 @@ public: TAO_THROW_SPEC ((CORBA::SystemException)); // Search cardinality determines the maximum number of offers searched - // before not considering other offers. - + // before not considering other offers. + virtual CORBA::ULong def_match_card (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); @@ -182,17 +182,17 @@ public: // Match cardinality determines the maximum number of offers // matched to the constraints before not considering other offers.. - + virtual CORBA::ULong def_return_card (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); virtual CORBA::ULong max_return_card (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - // Return cardinality determines the maximum number of offers marked + // Return cardinality determines the maximum number of offers marked // to return before not considering other offers. - + virtual CORBA::ULong max_list (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); @@ -208,7 +208,7 @@ public: virtual CosTrading::FollowOption max_follow_policy (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); - + private: const TAO_Import_Attributes_i& attrs_; @@ -224,7 +224,7 @@ public: // = CosTrading::LinkAttributes methods virtual CosTrading::FollowOption max_link_follow_policy (CORBA::Environment &env) TAO_THROW_SPEC ((CORBA::SystemException)); - + private: const TAO_Link_Attributes_i& attrs_; @@ -238,20 +238,20 @@ template <class SEQ_TYPE> class TAO_Sequence_Extracter : private TAO_Sequence_Extracter_Base // = TITLE // Happy hack to extract sequence data out of user defined sequence -// that may have x number of typedef aliases. +// that may have x number of typedef aliases. { public: TAO_Sequence_Extracter (CORBA::TypeCode* type_code) : typecode_ (CORBA::TypeCode::_duplicate (type_code)) {} - + CORBA::Boolean extract (const CORBA::Any&, SEQ_TYPE*&); // Extract the underlying sequence value into a newly allocated // sequence of type SEQ_TYPE. The any assumes ownership of the // sequence, so don't release it. - + private: - + CORBA::TypeCode_var typecode_; }; @@ -264,4 +264,4 @@ CORBA::Boolean TAO_find (const SEQ& sequence, const OPERAND_TYPE operand); #endif /* ACE_TEMPLATES_REQUIRE_SOURCE */ #endif /* ACE_TRADER_H */ - + diff --git a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h index 0d5abf78d88..5df0ea1dca6 100644 --- a/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h +++ b/TAO/orbsvcs/orbsvcs/Trader/Trader_Utils.h @@ -5,7 +5,7 @@ // // = LIBRARY // orbsvcs -// +// // = FILENAME // Trader_Utils.h // @@ -25,7 +25,7 @@ // TAO_Property_Filter // TAO_Property_Evaluator // TAO_Property_Evaluator_By_Name -// +// // ======================================================================== #ifndef TAO_TRADER_UTILS_H @@ -46,25 +46,25 @@ class TAO_ORBSVCS_Export TAO_Property_Evaluator // for a static property, TAO_Property_Evaluator provides methods // that will unify the two approaches under a single // interface. Since dynamic properties aren't necessarily supported -// by a trader, this class accounts for that contingency. The use of +// by a trader, this class accounts for that contingency. The use of // indexed lookups allows them to occur in constant time on the // CORBA sequences, but requires that the client know the layout of -// properties ahead of time. +// properties ahead of time. { public: - + TAO_Property_Evaluator(const CosTrading::PropertySeq& properties, - CORBA::Boolean supports_dp = 1); - + CORBA::Boolean supports_dp = 1); + TAO_Property_Evaluator(CosTrading::Offer& offer, - CORBA::Boolean supports_dp = 1); + CORBA::Boolean supports_dp = 1); // Construct an instance of TAO_Property_Evaluator that operates on // an <offer> where the support for dynamic properties is dictated // by <supports_dynamic_properties>. virtual ~TAO_Property_Evaluator (void); // Clean up dynamic properties. - + int is_dynamic_property(int index); // Returns 1 if the property at index <index> is dynamic. Returns a // 0 when the index is out of bounds. @@ -73,28 +73,28 @@ public: TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); // Returns value of the property whose index is <index>. If the - // property at that index is dynamic and the trader supports dynamic + // property at that index is dynamic and the trader supports dynamic // properties, then the property_value method will obtain the value // of the dynamic property using the evalDP method on the // CosTradingDynamic::DynamicPropEval interface, passing on a // CosTradingDynamic::DPEvalFailure exception on failure. If the // property index is undefined, the method returns a null pointer. - + CORBA::TypeCode_ptr property_type (int index); // Returns the type of the property whose index is <index>. If the // property is dynamic and the trader supports dynamic properties, // then the method returns the <returned_type> field of the // CosTradingDynamic::DynamicProp struct associated with the - // property name. If the index is out of bounds, the method returns + // property name. If the index is out of bounds, the method returns // a null pointer (that is, 0). - - protected: - + + protected: + typedef CosTradingDynamic::DynamicProp DP_Struct; typedef CosTradingDynamic::DynamicPropEval DP_Eval; - + const CosTrading::PropertySeq& props_; - // The offer from which the TAO_Property_Evaluator extracts property + // The offer from which the TAO_Property_Evaluator extracts property // information. int supports_dp_; @@ -105,7 +105,7 @@ public: // retrieved from dynamic properties and free them upon deletion. If // we didn't do this, then the property_value method would leak or // cause seg faults, since the client wouldn't be able to tell - // whether or not the return value should be freed. + // whether or not the return value should be freed. private: @@ -117,7 +117,7 @@ public: // TAO_Property_Evaluator_By_Name // ************************************************************* -class TAO_ORBSVCS_Export TAO_Property_Evaluator_By_Name : +class TAO_ORBSVCS_Export TAO_Property_Evaluator_By_Name : public TAO_Property_Evaluator // // = TITLE @@ -133,13 +133,13 @@ class TAO_ORBSVCS_Export TAO_Property_Evaluator_By_Name : public: TAO_Property_Evaluator_By_Name (const CosTrading::PropertySeq& properties, - CORBA::Environment& _env, - CORBA::Boolean supports_dp = 1) + CORBA::Environment& _env, + CORBA::Boolean supports_dp = 1) TAO_THROW_SPEC ((CosTrading::DuplicatePropertyName, - CosTrading::IllegalPropertyName)); - + CosTrading::IllegalPropertyName)); + TAO_Property_Evaluator_By_Name(CosTrading::Offer& offer, - CORBA::Boolean supports_dp = 1); + CORBA::Boolean supports_dp = 1); // Construct an instance of TAO_Property_Evaluator that operates on // an <offer> where the support for dynamic properties is dictated // by <supports_dynamic_properties>. @@ -150,28 +150,28 @@ public: // will throw a Property_Undefined exception with impunity. CORBA::Any* property_value(const char* property_name, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); // This method is identical to its counterpart in - // TAO_Property_Evaluator, except property_value first discovers the + // TAO_Property_Evaluator, except property_value first discovers the // index through a string matching lookup. - + CORBA::TypeCode_ptr property_type(const char* property_name); // This method is identical to its counterpart in // TAO_Property_Evaluator, exception property_type first discovers // the index through a string matching lookup. const CosTrading::Property* get_property (const char* property_name); - + private: TAO_Property_Evaluator_By_Name (const TAO_Property_Evaluator_By_Name&); TAO_Property_Evaluator_By_Name& operator= (const TAO_Property_Evaluator_By_Name&); - + TAO_Lookup_Table table_; // The instance of the above mapping for the offer provided in the - // constructor. + // constructor. }; // ************************************************************* @@ -187,23 +187,23 @@ class TAO_ORBSVCS_Export TAO_Dynamic_Property : public: TAO_Dynamic_Property (void) {} - + TAO_Dynamic_Property (const TAO_Dynamic_Property& dp) {} - + virtual ~TAO_Dynamic_Property (void); - + virtual CORBA::Any* evalDP(const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& _env) + CORBA::TypeCode_ptr returned_type, + const CORBA::Any& extra_info, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTradingDynamic::DPEvalFailure)) = 0; + CosTradingDynamic::DPEvalFailure)) = 0; // Dynamic property evaluation call-back method. - + CosTradingDynamic::DynamicProp* - construct_dynamic_prop (const char* name, - CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info); + construct_dynamic_prop (const char* name, + CORBA::TypeCode_ptr returned_type, + const CORBA::Any& extra_info); // Method to construct a dynamic property structure suitable for // exporting in a CosTrading::PropertyStruct to the Trading Service. }; @@ -218,11 +218,11 @@ class TAO_Policies // = TITLE // This class ensures that policies submitted to Lookup make sense, // have the correct value types, and don't exceed the maximums set -// through the Admin Interface. +// through the Admin Interface. // // = DESCRIPTION // TAO_Policies does an admirable job of reconciling differences -// between the default parameter settings of the Trader and the import +// between the default parameter settings of the Trader and the import // and other policies set by the client. Unbeknownst to its client // TAO_Policies hides this arbitration, and records whether the user // policy was chosen, or the default. This information gets returned @@ -249,15 +249,15 @@ public: // This enum represents the relative order that properties are // passed from one trader to another. Hence, as recommended by the // spec, the starting_trader policies will be the first element in - // the polcy sequence if it's set for a query. - + // the polcy sequence if it's set for a query. + static const char * POLICY_NAMES[]; - + TAO_Policies (TAO_Trader_Base& trader, - const CosTrading::PolicySeq& policies, - CORBA::Environment& _env) + const CosTrading::PolicySeq& policies, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTrading::Lookup::IllegalPolicyName, - CosTrading::DuplicatePolicyName)); + CosTrading::DuplicatePolicyName)); // BEGIN SPEC // The "policies" parameter allows the importer to specify how the @@ -278,11 +278,11 @@ public: // starting_trader policy value is malformed), then an // InvalidPolicyValue exception is raised. ° If the same policy name // is included two or more times in this parameter, then the - // DuplicatePolicyName exception is raised. + // DuplicatePolicyName exception is raised. // END SPEC ~TAO_Policies (void); - + CORBA::ULong search_card (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -294,7 +294,7 @@ public: // trader. If this policy is not specified, then the value of the // trader's def_search_card attribute is used. // END SPEC - + CORBA::ULong match_card (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -306,7 +306,7 @@ public: // not specified, then the value of the trader's def_match_card // attribute is used. // END SPEC - + CORBA::ULong return_card (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -316,11 +316,11 @@ public: // query. The lesser of this value and the trader's max_return_card // attribute is used by the trader. If this policy is not specified, // then the value of the trader's def_return_card attribute is - // used. + // used. // END SPEC - + // = Offer consideration policies - + CORBA::Boolean use_modifiable_properties (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -333,7 +333,7 @@ public: // will not. If this policy is not specified, such offers will be // included. // END SPEC - + CORBA::Boolean use_dynamic_properties (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -346,7 +346,7 @@ public: // will not. If this policy is not specified, such offers will be // included. // END SPEC - + CORBA::Boolean use_proxy_offers (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -358,7 +358,7 @@ public: // will be included; if FALSE, they will not. If this policy is not // specified, such offers will be included. // END SPEC - + CORBA::Boolean exact_type_match (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -368,12 +368,12 @@ public: // type; if not (and by default), then any offer of a type // conformant to the importer's service type is considered. // END SPEC - + // = Federated trader policies (not implemented yet) - + CosTrading::TraderName* starting_trader (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue)); + CosTrading::Lookup::InvalidPolicyValue)); // BEGIN SPEC // The "starting_trader" policy facilitates the distribution of the // trading service itself. It allows an importer to scope a search @@ -397,25 +397,25 @@ public: // BEGIN SPEC //The "link_follow_rule" policy indicates how the client wishes //links to be followed in the resolution of its query. See the - //discussion in "Link Follow Behavior" on page 16-16 for details. + //discussion in "Link Follow Behavior" on page 16-16 for details. // END SPEC - + CosTrading::FollowOption link_follow_rule (const CosTrading::Link::LinkInfo& link_info, - CORBA::Environment& _env) const + CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, + CosTrading::Lookup::InvalidPolicyValue, CosTrading::Link::IllegalLinkName, CosTrading::Link::UnknownLinkName)); // Determine the link follow policy for a given <link_name>. - // This method returns the link_follow_rule for a link whose name is + // This method returns the link_follow_rule for a link whose name is // <link_name> using the following formula: // if the importer specified a link_follow_rule policy // min(trader.max_follow_policy, link.limiting_follow_rule, // query.link_follow_rule) // else min(trader.max_follow_policy, link.limiting_follow_rule, - // trader.def_follow_policy) - + // trader.def_follow_policy) + CORBA::ULong hop_count (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); @@ -428,18 +428,18 @@ public: // the trader's def_hop_count attribute if it is not. If the // resulting value is zero, then no federated queries are // permitted. If it is greater than zero, then it must be - // decremented before passing on to a federated trader. + // decremented before passing on to a federated trader. // END SPEC CosTrading::Admin::OctetSeq* request_id (CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); // Return the request_id passed to the query method across a link to - // another trader. + // another trader. void copy_to_pass (CosTrading::PolicySeq& policy_seq, const CosTrading::Admin::OctetSeq& request_id) const; // Policies to forward to the next trader in a federated query. - + void copy_to_forward (CosTrading::PolicySeq& policy_seq, const CosTrading::TraderName& name) const; // Policies to forward to the next trader in a directed query. @@ -450,29 +450,29 @@ public: TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch, CosTrading::Lookup::InvalidPolicyValue)); // Determine the link follow policy to pass down the link with <link_name>. - // This method returns the link_follow_rule for a link whose name is + // This method returns the link_follow_rule for a link whose name is // <link_name> using the following formula: // If the importer specified a link_follow_rule, policy // pass on min(query.link_follow_rule, link.limiting_follow_rule, // trader.max_follow_policy) // else pass on min(link.def_pass_on_follow_rule, // trader.max_follow_policy) - -private: - + +private: + CORBA::ULong ulong_prop (POLICY_TYPE pol, - CORBA::Environment& _env) const + CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); // Reconclile a ULong property with its default. - + CORBA::Boolean boolean_prop (POLICY_TYPE pol, - CORBA::Environment& _env) const + CORBA::Environment& _env) const TAO_THROW_SPEC ((CosTrading::Lookup::PolicyTypeMismatch)); // Reconcile a Boolean property with its debault. TAO_Policies (const TAO_Policies&); TAO_Policies& operator= (const TAO_Policies&); - + CosTrading::Policy* policies_[TAO_NUM_POLICIES]; // The policies indexable from the enumerated type. @@ -488,7 +488,7 @@ class TAO_ORBSVCS_Export TAO_Policy_Manager // = TITLE // // This class is a utility for clients using the CosTrading::Lookup -// interface that helps them build a policy sequence without violating +// interface that helps them build a policy sequence without violating // syntax rules and having to mess with typecodes. { public: @@ -496,25 +496,25 @@ public: TAO_Policy_Manager (int num_policies = 0); // = Routines to set policies. - + void search_card (CORBA::ULong scard); // Set the maximum number of offers searched for the query. - + void match_card (CORBA::ULong mcard); // Set the maximum number of offers searched for the query. - + void return_card (CORBA::ULong rcard); - // Set the maximum number of offers rerturned for the query. + // Set the maximum number of offers rerturned for the query. // A note about cardinalities: The spec implies that these // cardinalities apply to the global office space, that is, all // offers on all linked traders. However, there's no mechanism for // one trader to return to the calling trader the number of offers // searched or matched. Thus, these cardinalities are applied on a - // per-trader basis. - + // per-trader basis. + void use_modifiable_properties (CORBA::Boolean mod_props); - // Consider offers with modifiable properties. + // Consider offers with modifiable properties. void use_dynamic_properties (CORBA::Boolean dyn_props); // Consider offers with dynamic properties. @@ -525,7 +525,7 @@ public: void starting_trader (const CosTrading::TraderName& name); // Copy void starting_trader (CosTrading::TraderName* name); // Own // Designate a trader at which to begin the query. - + void link_follow_rule (CosTrading::FollowOption follow_option); // Specify under what conditions a federated query is appropriate. @@ -534,7 +534,7 @@ public: void request_id (const CosTrading::Admin::OctetSeq& request_id); // Set the identifier for this query (clients shouldn't use this). - + void exact_type_match (CORBA::Boolean exact_type); // Search only the designated type --- not it's subtypes. @@ -544,19 +544,19 @@ public: const CosTrading::PolicySeq& policy_seq (void) const; // Return a PolicySeq suitable for passing to the query method of // the Lookup interface. - + private: TAO_Policy_Manager (const TAO_Policy_Manager&); TAO_Policy_Manager& operator= (const TAO_Policy_Manager&); - + CosTrading::Policy& fetch_next_policy (TAO_Policies::POLICY_TYPE pol_type); // Method to prepare the next slot in the policies_ sequence for // policy insertion. - + int poltable_[TAO_Policies::REQUEST_ID + 1]; // Table mapping policy enum value to the index in the policies sequence. - + CosTrading::PolicySeq policies_; // The sequence being prepared for submittal to the query method. @@ -572,34 +572,34 @@ private: class TAO_Offer_Modifier // = TITLE // This class deletes, modifies, and adds properties to a given -// offer according to the rules of the modify method on the Register +// offer according to the rules of the modify method on the Register // interface. { public: TAO_Offer_Modifier (const char* type, - const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct, - CosTrading::Offer* offer); + const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct, + CosTrading::Offer* offer); // Modify an <offer> of type <type>, whose properties are described // by <type_struct> ~TAO_Offer_Modifier (void); void delete_properties (const CosTrading::PropertyNameSeq& deletes, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTrading::Register::UnknownPropertyName, - CosTrading::Register::MandatoryProperty, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName)); + CORBA::Environment& _env) + TAO_THROW_SPEC ((CosTrading::Register::UnknownPropertyName, + CosTrading::Register::MandatoryProperty, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName)); // Delete the properties whose names were given to the // constructor. Ensure we don't delete mandatory properties. void merge_properties (CosTrading::PropertySeq& modifies, - CORBA::Environment& _env) - TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, + CORBA::Environment& _env) + TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, CosTrading::DuplicatePropertyName, CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, + CosTrading::ReadonlyDynamicProperty, CosTrading::Register::ReadonlyProperty)); // Copy to the destination the union of the source and destination // properties. In the case of duplicate properties, update the @@ -612,7 +612,7 @@ public: private: TAO_Offer_Modifier (const TAO_Offer_Modifier&); - TAO_Offer_Modifier& operator= (const TAO_Offer_Modifier&); + TAO_Offer_Modifier& operator= (const TAO_Offer_Modifier&); typedef ACE_Hash_Map_Manager < @@ -623,21 +623,21 @@ private: Property_Table; const char* type_; - // The type of the offer. - + // The type of the offer. + Property_Table props_; // The map of properties in the offer. TAO_Typecode_Table prop_types_; // Table of property types. - + TAO_String_Set readonly_, mandatory_; // The set of readonly and mandatory property names in the offer's // type. CosTrading::PropertySeq merge_props_; // Sequence of properties to merge with the original. - + CosTrading::Offer* offer_; // A reference to the offer undergoing change. }; @@ -651,7 +651,7 @@ class TAO_Offer_Filter // The purpose of this class is to ensure that offers that // shouldn't be considered by the TAO_Constraint_Interpreter // aren't. -// +// // = DESCRIPTION // There two classes of reasons why an offer for a correct // type shouldn't be considered: 1) The default parameters of the @@ -660,39 +660,39 @@ class TAO_Offer_Filter // readonly) or dynamic properties. 2) We've exceeded the // default or provided cardinality constraints. TAO_Offer_Filter // ensures that violation of policies doesn't occur. It's the -// enforcer. +// enforcer. { public: - + TAO_Offer_Filter (TAO_Policies& policies, - CORBA::Environment& _env); + CORBA::Environment& _env); // Glean from the TypeStruct and Policy setting the appropriate way // to screen unsuitable offers from consideration. void configure_type (CosTradingRepos::ServiceTypeRepository::TypeStruct* type_struct); // Set the offer filter to screen for offers containing properties // that aren't marked as readonly in this TypeStruct. - + CORBA::Boolean ok_to_consider (CosTrading::Offer* offer); // Determine whether the poicies contained in the given policy - // object allow the Lookup interface to consider the offer. That is, + // object allow the Lookup interface to consider the offer. That is, // if use_modifiable_properties is false, and the offer contains // modifiable properties as designated in the type struct, return - // false. If use_dynamic_properties is false, and the offer contains - // dynamic properties, then return false. If the lookup interface is - // safe in considering this offer, return true and subtract from the + // false. If use_dynamic_properties is false, and the offer contains + // dynamic properties, then return false. If the lookup interface is + // safe in considering this offer, return true and subtract from the // search card value. When the search card value falls to zero, // ok_to_consider always returns false. - + CORBA::Boolean ok_to_consider_more (void); // It's ok to consider more offers when lookup hasn't exceeded the // cardinality values for searching and matching offers. void matched_offer (void); - // Signal that the Lookup method has matched an offer; decrement the + // Signal that the Lookup method has matched an offer; decrement the // match_card. - // = Return the limits applied. + // = Return the limits applied. CosTrading::PolicyNameSeq* limits_applied (void); // BEGIN SPEC // If any cardinality or other limits were applied by one or more @@ -701,27 +701,27 @@ public: // which limited the query. The sequence of names returned in // "limits_applied" from any federated or proxy queries must be // concatenated onto the names of limits applied locally and - // returned. + // returned. // END SPEC CORBA::ULong search_card_remaining (void) const; CORBA::ULong match_card_remaining (void) const; // Accessors to retrieve the adjusted cardinalities. - + private: TAO_Offer_Filter (const TAO_Offer_Filter&); TAO_Offer_Filter& operator= (const TAO_Offer_Filter&); - + TAO_String_Set not_mod_props_; // The set of the name of modifiable properties. TAO_String_Set limits_; // Cardinality and property limitations applied. - + CORBA::ULong search_card_, match_card_, return_card_; // Keep track of the cardinalities. - + CORBA::Boolean dp_; CORBA::Boolean mod_; // Keep track of property limitations: modifiable or dynamic ones @@ -737,7 +737,7 @@ class TAO_Property_Filter // // The Ace_Property_Filter copies those properties specified in a // CosTrading::Lookup::SpecifiedProps from a source -// CosTrading::Offer to a destination CosTrading::Offer. +// CosTrading::Offer to a destination CosTrading::Offer. { public: @@ -745,25 +745,25 @@ public: TAO_Property_Filter (void) : policy_ (CosTrading::Lookup::all) {} // An accomplice to g++'s insane lust for copy constructors. - + TAO_Property_Filter (const SPECIFIED_PROPS& desired_props, - CORBA::Environment& env) + CORBA::Environment& env) TAO_THROW_SPEC ((CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName)); + CosTrading::DuplicatePropertyName)); // Verify that the specified properties are correct. TAO_Property_Filter (const TAO_Property_Filter& prop_filter); TAO_Property_Filter& operator= (const TAO_Property_Filter& prop_filter); - + void filter_offer (CosTrading::Offer* source, CosTrading::Offer& destination); // Copy the desired properties from the source offer to the // destination offer. - + private: typedef ACE_Unbounded_Queue< CosTrading::Property* > Prop_Queue; - + TAO_String_Set props_; CosTrading::Lookup::HowManyProps policy_; }; diff --git a/TAO/orbsvcs/orbsvcs/orbsvcs_export.h b/TAO/orbsvcs/orbsvcs/orbsvcs_export.h index 2ca6a91c499..fd8548f6f43 100644 --- a/TAO/orbsvcs/orbsvcs/orbsvcs_export.h +++ b/TAO/orbsvcs/orbsvcs/orbsvcs_export.h @@ -4,12 +4,16 @@ // This file is generated automatically by // ${TAO_ROOT}/TAO_IDL/GenExportH.BAT // ------------------------------ -#if !defined (TAO_ORBSVCS_EXPORT_H) +#ifndef TAO_ORBSVCS_EXPORT_H #define TAO_ORBSVCS_EXPORT_H #include "ace/OS.h" -#if defined (TAO_ORBSVCS_HAS_DLL) +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + +#if defined (TAO_ORBSVCS_HAS_DLL) # if (TAO_ORBSVCS_HAS_DLL == 1) # if defined (TAO_ORBSVCS_BUILD_DLL) # define TAO_ORBSVCS_Export ACE_Proper_Export_Flag @@ -18,7 +22,7 @@ # define TAO_ORBSVCS_Export ACE_Proper_Import_Flag # define TAO_ORBSVCS_SINGLETON_DECLARATION(T) ACE_IMPORT_SINGLETON_DECLARATION (T) # endif /* TAO_ORBSVCS_BUILD_DLL */ -# else +# else # define TAO_ORBSVCS_Export # define TAO_ORBSVCS_SINGLETON_DECLARATION(T) # endif /* ! TAO_ORBSVCS_HAS_DLL == 1 */ diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/child.h b/TAO/orbsvcs/tests/AVStreams/benchmark/child.h index 7a69562ebfb..3baf5852d47 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/child.h +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/child.h @@ -1,9 +1,14 @@ // $Id$ -#if !defined (TAO_AV_BENCH_CHILD_H) +#ifndef TAO_AV_BENCH_CHILD_H #define TAO_AV_BENCH_CHILD_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" @@ -39,7 +44,7 @@ private: ACE_HANDLE control_handle_; }; -class Bench_Server_StreamEndPoint +class Bench_Server_StreamEndPoint :public TAO_Server_StreamEndPoint { public: @@ -54,17 +59,17 @@ public: virtual int handle_stop (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, + + virtual int handle_start (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, + + virtual int handle_destroy (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; private: ACE_SOCK_Connector connector_; diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/client.h b/TAO/orbsvcs/tests/AVStreams/benchmark/client.h index 390c2016b27..6d4b8cdbc7a 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/client.h +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/client.h @@ -4,10 +4,15 @@ // NOTE: If you encounter trouble resolving the Naming Service, try // running the Naming Service and the server in the same window. [MJB] -#if !defined (TAO_AV_BENCH_CLIENT_H) +#ifndef TAO_AV_BENCH_CLIENT_H #define TAO_AV_BENCH_CLIENT_H #include "ace/Reactor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Event_Handler.h" #include "ace/ARGV.h" #include "tao/TAO.h" @@ -43,26 +48,26 @@ public: virtual CORBA::Boolean handle_postconnect (AVStreams::flowSpec &the_spec); // called after connecting - - virtual int handle_start (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; + + virtual int handle_start (const AVStreams::flowSpec &the_spec, + CORBA::Environment &env) ; virtual int handle_stop (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env) ; - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); - + CORBA::Environment &env) ; + + virtual int handle_destroy (const AVStreams::flowSpec &the_spec, + CORBA::Environment &env); + }; class ttcp_Client_StreamEndPoint; -class ttcp_Acceptor +class ttcp_Acceptor :public virtual ACE_Acceptor <ttcp_Client_StreamEndPoint,ACE_SOCK_ACCEPTOR> { public: ttcp_Acceptor (ttcp_Client_StreamEndPoint *endpoint); - + virtual int make_svc_handler (ttcp_Client_StreamEndPoint *&sh); private: ttcp_Client_StreamEndPoint *endpoint_; @@ -88,15 +93,15 @@ public: private: ttcp_Acceptor acceptor_; // The Acceptor. - + Client *client_; }; -class ttcp_Endpoint_Reactive_Strategy_A - : public TAO_AV_Endpoint_Reactive_Strategy_A<ttcp_Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> +class ttcp_Endpoint_Reactive_Strategy_A + : public TAO_AV_Endpoint_Reactive_Strategy_A<ttcp_Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> { public: ttcp_Endpoint_Reactive_Strategy_A (TAO_ORB_Manager *orb_manager, - Client *client_ptr); + Client *client_ptr); // constructor . The orb manager is needed for the TAO_AV_Endpoint_Reactive_Strategy_A. virtual int make_stream_endpoint (ttcp_Client_StreamEndPoint *& endpoint); @@ -127,7 +132,7 @@ private: TAO_ORB_Manager orb_manager_; TAO_Naming_Client my_name_client_; - + // ttcp_Endpoint_Reactive_Strategy_A reactive_strategy_; TAO_AV_Endpoint_Reactive_Strategy_A<Client_StreamEndPoint,TAO_VDev,AV_Null_MediaCtrl> reactive_strategy_; @@ -137,7 +142,7 @@ private: TAO_MMDevice client_mmdevice_; TAO_StreamCtrl streamctrl_; - // Video stream controller + // Video stream controller int argc_; diff --git a/TAO/orbsvcs/tests/AVStreams/benchmark/server.h b/TAO/orbsvcs/tests/AVStreams/benchmark/server.h index 5c1f22b581e..d311a84a357 100644 --- a/TAO/orbsvcs/tests/AVStreams/benchmark/server.h +++ b/TAO/orbsvcs/tests/AVStreams/benchmark/server.h @@ -6,11 +6,16 @@ // running the Naming Service and the server in the same window. [MJB] -#if !defined (TAO_AV_BENCH_SERVER_H) +#ifndef TAO_AV_BENCH_SERVER_H #define TAO_AV_BENCH_SERVER_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" @@ -23,7 +28,7 @@ #include "client.h" #include "child.h" -class AV_Server_Sig_Handler +class AV_Server_Sig_Handler : public virtual ACE_Event_Handler { public: @@ -35,7 +40,7 @@ public: // this will register this sig_handler // with the reactor for SIGCHLD,SIGTERM,SIGINT - virtual int shutdown (ACE_HANDLE, + virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); virtual int handle_input (ACE_HANDLE); @@ -60,13 +65,13 @@ class Server public: Server (void); // Default constructor - + int init (int argc, char **argv, CORBA::Environment& env); - + int run (CORBA::Environment& env); - + ~Server (void); private: TAO_ORB_Manager orb_manager_; @@ -74,7 +79,7 @@ private: TAO_Naming_Client my_name_client_; // The TAO Naming server - + //CosNaming::NamingContext_var naming_context_; // The root naming context of the naming service diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h index 2708154c055..140ba26e82c 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/include/common.h @@ -1,33 +1,37 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen * Department of Computer Science and Engineering * email: scen@cse.ogi.edu */ -#if !defined (_MPEG_COMMON_H) +#ifndef _MPEG_COMMON_H #define _MPEG_COMMON_H #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + extern int gethostname (char*, size_t); #define VERSION 200 /* version 2.00 */ @@ -45,19 +49,19 @@ extern int gethostname (char*, size_t); /* #define LOG_DIR "/home/shanweic/log/" -#define DEVELOPER_UID 8640 +#define DEVELOPER_UID 8640 */ /* %% this is where the logging is done.." */ #define LOG_DIR "./" -#define DEVELOPER_UID 1735 +#define DEVELOPER_UID 1735 -#define SFprintf if ((!getuid()) || getuid() == DEVELOPER_UID) fprintf -#define Fprintf if (shared->config.verbose) fprintf +#define SFprintf if ((!getuid()) || getuid() == DEVELOPER_UID) fprintf +#define Fprintf if (shared->config.verbose) fprintf -#define VCR_TCP_PORT 7101 -#define VCR_UNIX_PORT "/tmp/vcr_unix_port01" -#define VCR_ATM_PORT "3005" +#define VCR_TCP_PORT 7101 +#define VCR_UNIX_PORT "/tmp/vcr_unix_port01" +#define VCR_ATM_PORT "3005" #define SPEEDUP_INV_SCALE 5 /* VS fast starts at 5/(5-1) normal speed */ @@ -71,15 +75,15 @@ extern int gethostname (char*, size_t); #define VD_BUF_SIZE (1024 * 1024) /* Size of client VD buffer */ -#define PATH_SIZE 256 -#define PATTERN_SIZE 100 -#define MAX_FRAMES 54000 /* half hour video at 30FPS */ +#define PATH_SIZE 256 +#define PATTERN_SIZE 100 +#define MAX_FRAMES 54000 /* half hour video at 30FPS */ #define MAX_VDQUEUE_SIZE 20 -#define MAX_FB_PACKETS 20 /* max number of feedback packet info collected. */ -#define POSITION_RANGE 100 -#define MSGGAP_MIN -10 /* these are used for recording stat of - msgs received by VB */ -#define MSGGAP_MAX 50 +#define MAX_FB_PACKETS 20 /* max number of feedback packet info collected. */ +#define POSITION_RANGE 100 +#define MSGGAP_MIN -10 /* these are used for recording stat of + msgs received by VB */ +#define MSGGAP_MAX 50 #define INET_SOCKET_BUFFER_SIZE 1400 @@ -94,14 +98,14 @@ extern int gethostname (char*, size_t); /* Video and audio compression format */ -#define VIDEO_MPEG1 0 -#define VIDEO_MPEG2 1 -#define VIDEO_JPEG 3 -#define VIDEO_SIF 4 +#define VIDEO_MPEG1 0 +#define VIDEO_MPEG2 1 +#define VIDEO_JPEG 3 +#define VIDEO_SIF 4 -#define AUDIO_RAW 10 -#define AUDIO_MPEG1 11 -#define AUDIO_MPEG2 12 +#define AUDIO_RAW 10 +#define AUDIO_MPEG1 11 +#define AUDIO_MPEG2 12 /* system configuration default values */ @@ -130,10 +134,10 @@ extern int gethostname (char*, size_t); typedef struct { - int encodeType; - int channels; - int samplesPerSecond; - int bytesPerSample; + int encodeType; + int channels; + int samplesPerSecond; + int bytesPerSample; } AudioParameter; /* client processes shared data structure definition */ @@ -145,14 +149,14 @@ typedef struct char * VBbufAddr, * VDbufAddr; int pixelValid; unsigned char pixel[256]; /* for transfering pixel value from VP to VD */ - + /* command and status */ int cmd; int cmdsn; int cmdBusy; int loopBack; - + int framesPerSecond; /* Frames per second */ int usecPerFrame; /* micro-seconds per frame, actual video speed */ int samplesPerSecond; /* Samples per second */ @@ -170,7 +174,7 @@ typedef struct int live; /* non-zero if any of the video/audio streams are live source */ int videoFormat; int audioFormat; - + /* video channel parameters */ int totalFrames; int totalGroups; @@ -186,21 +190,21 @@ typedef struct char pattern[PATTERN_SIZE]; int IframeGap; int VStimeAdvance; - + int lastIframeDecoded; int sendPatternGops; char sendPattern[PATTERN_SIZE]; float frameRateLimit; int framesDropped; int qosRecomputes; - + /* video channel status */ int currentGroup; int currentFrame; int currentDisplay; int nextFrame; int nextGroup; - + /* audio channel parameters */ int totalSamples; AudioParameter audioPara; @@ -214,87 +218,87 @@ typedef struct int currentUPF; int rtplay; /* realtime tag, -- VD needs to drop frames when needed */ int collectStat; /* to indicate if statistics should be collected or not */ - int VBheadFrame; /* ID of last frame put to VBbuffer by VB */ + int VBheadFrame; /* ID of last frame put to VBbuffer by VB */ int needHeader; /* VD requests resending of systerm Header */ int playRoundTripDelay; /* play round trip time (from issuing play/FF/FB - command to first Decoded frame showup in - VD buffer) estimated by CTR start_timer() */ - int audioMaxPktSize; /* 0 -- reliable byte stream, - >0 - non-discard mode packet stream, - <0 - discard mode packet stream */ + command to first Decoded frame showup in + VD buffer) estimated by CTR start_timer() */ + int audioMaxPktSize; /* 0 -- reliable byte stream, + >0 - non-discard mode packet stream, + <0 - discard mode packet stream */ int videoMaxPktSize; /* System configuration parameters */ struct { - int rt; /* play as fast as possible without dropping frames, - and audio turned off when this tag is set to 0 (zero) - */ - int maxFPS; /* maximum PLAY frames-per-second, this play speed is used - during playback when speed scale is set to 100 */ + int rt; /* play as fast as possible without dropping frames, + and audio turned off when this tag is set to 0 (zero) + */ + int maxFPS; /* maximum PLAY frames-per-second, this play speed is used + during playback when speed scale is set to 100 */ int maxSPS; /* similar to maxFPS, used when audio is played without - corresponding video - */ - int ffFPS; /* play speed when Fast forward */ - int fbFPS; /* play speed when fast rewind */ + corresponding video + */ + int ffFPS; /* play speed when Fast forward */ + int fbFPS; /* play speed when fast rewind */ int feedBackDelay; /* msec, delay of feedback when AB, VB received first - packet, 0 (zero) default to adaptive */ + packet, 0 (zero) default to adaptive */ int audioMask; /* mask for audio output device */ AudioParameter audioPara; /* default audio parameter by system */ int audioTimerDuration; /* for audio-only case, miliseconds */ int audioBufferedIntervals; /* for audio-only case, - audioTimerDuration * audioBufferedIntervals - milliseconds of audio samples will be buffered - in AF buffer - */ + audioTimerDuration * audioBufferedIntervals + milliseconds of audio samples will be buffered + in AF buffer + */ int framesPerAudioPlay; /* for audio-video case, each time, samples corresponding - to this number of video frames will be played */ + to this number of video frames will be played */ int audioForward; /* forward value for audio channel, in AFTime unit - (number of samples), audio channel is played ahead of video - by this number of samples. This is introduce to compensate - the dely to AF in audio channel, and usually should be less - than 1 (one) second, but greater than zero. - */ + (number of samples), audio channel is played ahead of video + by this number of samples. This is introduce to compensate + the dely to AF in audio channel, and usually should be less + than 1 (one) second, but greater than zero. + */ int VStimeAdvance; /* target VB buffer level to be mentained (micro-seconds). This - is sent in INIT message to VS, to decide how many frames to - be maintained in VB buffer - */ + is sent in INIT message to VS, to decide how many frames to + be maintained in VB buffer + */ float frameRateLimit; /* playback frame rate limit (frames per second) */ int collectStat; /* tag to collect statistics to file 'stat.n' when set */ int collectFrameInfo; /* collect MPEG frame info to file 'stat.n' when set*/ int syncEffective; /* tag to make sync mechanism effective when set */ int qosEffective; /* tag to make QoS control effective when set */ - int audioOffset; /* offset added to audio channel 'nextSample' when play(). - usually audio and video are not recorded strictly - synchronized. This parameter is to compensate it. The - value can be any integer value. - */ + int audioOffset; /* offset added to audio channel 'nextSample' when play(). + usually audio and video are not recorded strictly + synchronized. This parameter is to compensate it. The + value can be any integer value. + */ int filterPara; /* 1/R of Median, nsamples of Mean and Average */ - int maxSPframes; /* max number of frame in a sendPattern */ - int audioConn; /* tag for connection oriented audio data channel */ - int videoConn; /* tag for connection oriented video data channel */ + int maxSPframes; /* max number of frame in a sendPattern */ + int audioConn; /* tag for connection oriented audio data channel */ + int videoConn; /* tag for connection oriented video data channel */ int verbose; } config; #ifdef STAT struct { - unsigned VBmaxBytes; /* max fill level (bytes) in VB */ - unsigned VBdroppedFrames; /* accumulative total number of frames dropped by VB - because VB buffer full */ - unsigned VBemptyTimes; /* number of time VD fail to get a frame from VB - immediately */ + unsigned VBmaxBytes; /* max fill level (bytes) in VB */ + unsigned VBdroppedFrames; /* accumulative total number of frames dropped by VB + because VB buffer full */ + unsigned VBemptyTimes; /* number of time VD fail to get a frame from VB + immediately */ unsigned VDnoRef; /* # of frames without reference */ unsigned VDagainstSendPattern; /* # of frames against send pattern */ unsigned VDtooLateI; /* # of I frames dropped 'cause too late */ unsigned VDtooLateP; /* # of P frames dropped 'cause too late */ unsigned VDtooLateB; /* # of B frames dropped 'cause too late */ - unsigned VDlastFrameDecoded; /* ID of last frame decoded by VD */ + unsigned VDlastFrameDecoded; /* ID of last frame decoded by VD */ unsigned CTRdropLate; unsigned CTRdropOutOrder; unsigned CTRdispOnTime; unsigned CTRdispLate; - unsigned fbPacketNumber; /* # packets sent by feedback mechanism */ + unsigned fbPacketNumber; /* # packets sent by feedback mechanism */ struct { int frameId; int addUsecPerFrame; @@ -303,14 +307,14 @@ typedef struct int framesDropped; float frameRateLimit; int advance; - } fbPackets[MAX_FB_PACKETS]; /* recording FB packet contents */ + } fbPackets[MAX_FB_PACKETS]; /* recording FB packet contents */ unsigned VDqueue[MAX_VDQUEUE_SIZE]; /* record number of frames with VD queue - length of index number */ + length of index number */ int VBmsgGaps[MSGGAP_MAX + 1 - MSGGAP_MIN]; /* # of ind-sized gaps between msgs */ char VBframesReceived[(MAX_FRAMES + 7)/8]; /* bit array for frames received by VB */ - char VDframesDecoded[(MAX_FRAMES + 7)/8]; /* bit array for frames decoded by VD */ - char VPframesDisplayed[(MAX_FRAMES + 7)/8]; /* bit array for frames displayed by VP */ - short VBfillLevel[MAX_FRAMES]; /* VB buffer fill level (frames) recorded by CTR */ + char VDframesDecoded[(MAX_FRAMES + 7)/8]; /* bit array for frames decoded by VD */ + char VPframesDisplayed[(MAX_FRAMES + 7)/8]; /* bit array for frames displayed by VP */ + short VBfillLevel[MAX_FRAMES]; /* VB buffer fill level (frames) recorded by CTR */ } stat; #endif } SharedData; @@ -320,30 +324,30 @@ typedef struct /* GUI to CTR, (and also CTR to VS and/or AS) */ #define CmdINIT 0 /* followed by: videoHost, videoPath, audioHost, audioPath - each item is passed as a string (without 0), led with length(int) */ -#define CmdINITaudio 1 /* for CTR-AS */ -#define CmdINITvideo 2 /* for CTR-VS */ + each item is passed as a string (without 0), led with length(int) */ +#define CmdINITaudio 1 /* for CTR-AS */ +#define CmdINITvideo 2 /* for CTR-VS */ #define CmdSTOP 3 -#define CmdFF 4 -#define CmdFB 5 +#define CmdFF 4 +#define CmdFB 5 #define CmdSTEP 6 -#define CmdPLAY 7 -#define CmdREF 20 /* this is for sending REFerence frame by VS - for CmdSTEP and CmdPLAY */ -#define CmdPOSITION 8 /* followed by position */ -#define CmdPOSITIONrelease 9 /* followed by position */ -#define CmdVOLUME 10 /* followed by position */ -#define CmdBALANCE 11 /* followed by position */ -#define CmdSPEED 12 /* followed by position */ -#define CmdLOOPenable 13 -#define CmdLOOPdisable 14 -#define CmdSTATstream 23 /* reply with { | type(byte) | size(int) }+ | */ -#define CmdSTATsent 24 /* reply with { | byte }+ | */ -#define CmdCLOSE 18 -#define CmdFAIL 19 /* followed by a string */ - -#define CmdDONE 15 /* CTR to GUI: - replay for accptance and execution of Above Cmd */ +#define CmdPLAY 7 +#define CmdREF 20 /* this is for sending REFerence frame by VS + for CmdSTEP and CmdPLAY */ +#define CmdPOSITION 8 /* followed by position */ +#define CmdPOSITIONrelease 9 /* followed by position */ +#define CmdVOLUME 10 /* followed by position */ +#define CmdBALANCE 11 /* followed by position */ +#define CmdSPEED 12 /* followed by position */ +#define CmdLOOPenable 13 +#define CmdLOOPdisable 14 +#define CmdSTATstream 23 /* reply with { | type(byte) | size(int) }+ | */ +#define CmdSTATsent 24 /* reply with { | byte }+ | */ +#define CmdCLOSE 18 +#define CmdFAIL 19 /* followed by a string */ + +#define CmdDONE 15 /* CTR to GUI: + replay for accptance and execution of Above Cmd */ #define CmdVPinitScreen 30 /* CTR to VP(GUI), audio-only screen clearning */ #define CmdVPdisplayFrame 31 /* CTR to VP(GUI) to display the single frame in buffer */ @@ -375,7 +379,7 @@ typedef struct { int live; int format; - + int totalHeaders; int totalFrames; int totalGroups; @@ -508,7 +512,7 @@ typedef struct { int live; int format; - + AudioParameter para; int totalSamples; } INITaudioReply; @@ -575,7 +579,7 @@ typedef struct typedef struct { int sh, gop, frame, display, future, past; - int refcount; /* reference count */ + int refcount; /* reference count */ unsigned char * data; /* data buffer for image */ } FrameBlock; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h index a972440bc29..b45b17c38ee 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/Command_Handler.h @@ -26,6 +26,10 @@ */ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + // ============================================================================ // // = LIBRARY @@ -45,7 +49,7 @@ // ============================================================================ -#if !defined (AV_COMMAND_HANDLER_H) +#ifndef AV_COMMAND_HANDLER_H #define AV_COMMAND_HANDLER_H #include "ace/Reactor.h" @@ -76,7 +80,7 @@ class Receiver_i void push_audio_mmdevice (CORBA::Object_ptr mmdevice, const char* audio_file, - CORBA::Environment&); + CORBA::Environment&); private: Command_Handler *command_handler_; @@ -377,7 +381,7 @@ public: int operation_tag_; // operation tag for release/press for position. - + int position_val_; // value of the position button. @@ -473,7 +477,7 @@ public: int step (void); int play (int flag, - CORBA::Environment& env); + CORBA::Environment& env); int position_action (int operation_tag); @@ -566,7 +570,7 @@ private: Receiver_i receiver_; // Receive object,called by the agent to give the mmdevice object - // reference. + // reference. char *data_host_; // interface name to bind to for data transfer. diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h index 37d2dfa93ce..da6f73bca54 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/decoders.h @@ -2,17 +2,17 @@ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS @@ -32,6 +32,10 @@ #include "util.h" #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + /* Code for unbound values in decoding tables */ #define ERROR -1 #define DCT_ERROR 63 @@ -47,7 +51,7 @@ #define END_OF_BLOCK 62 #define ESCAPE 61 -/* Structure for an entry in the decoding table of +/* Structure for an entry in the decoding table of * macroblock_address_increment */ typedef struct { unsigned int value; /* value for macroblock_address_increment */ @@ -90,10 +94,10 @@ extern coded_block_pattern_entry coded_block_pattern[512]; /* Structure for an entry in the decoding table of motion vectors */ typedef struct { int code; /* value for motion_horizontal_forward_code, - * motion_vertical_forward_code, - * motion_horizontal_backward_code, or - * motion_vertical_backward_code. - */ + * motion_vertical_forward_code, + * motion_horizontal_backward_code, or + * motion_vertical_backward_code. + */ int num_bits; /* length of the Huffman code */ } motion_vectors_entry; @@ -156,127 +160,127 @@ extern unsigned short int dct_coeff_first[256]; flush_bits(dct_dc_size_chrominance[index].num_bits); \ } -#define DecodeDCTCoeff(dct_coeff_tbl, run, level) \ -{ \ - unsigned int temp, index; \ - unsigned int value, next32bits, flushed; \ - \ - /* \ - * Grab the next 32 bits and use it to improve performance of \ - * getting the bits to parse. Thus, calls are translated as: \ - * \ - * show_bitsX <--> next32bits >> (32-X) \ - * get_bitsX <--> val = next32bits >> (32-flushed-X); \ - * flushed += X; \ - * next32bits &= bitMask[flushed]; \ - * flush_bitsX <--> flushed += X; \ - * next32bits &= bitMask[flushed]; \ - * \ - * I've streamlined the code a lot, so that we don't have to mask \ - * out the low order bits and a few of the extra adds are removed. \ - */ \ - show_bits32(next32bits); \ - \ - /* show_bits8(index); */ \ - index = next32bits >> 24; \ - \ - if (index > 3) { \ - value = dct_coeff_tbl[index]; \ - run = value >> RUN_SHIFT; \ - if (run != END_OF_BLOCK) { \ - /* num_bits = (value & NUM_MASK) + 1; */ \ - /* flush_bits(num_bits); */ \ - if (run != ESCAPE) { \ - /* get_bits1(value); */ \ - /* if (value) level = -level; */ \ - flushed = (value & NUM_MASK) + 2; \ - level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \ - value = next32bits >> (32-flushed); \ - value &= 0x1; \ - if (value) level = -level; \ - /* next32bits &= ((~0) >> flushed); last op before update */ \ - } \ - else { /* run == ESCAPE */ \ - /* Get the next six into run, and next 8 into temp */ \ - /* get_bits14(temp); */ \ - flushed = (value & NUM_MASK) + 1; \ - temp = next32bits >> (18-flushed); \ - /* Normally, we'd ad 14 to flushed, but I've saved a few \ - * instr by moving the add below */ \ - temp &= 0x3fff; \ - run = temp >> 8; \ - temp &= 0xff; \ - if (temp == 0) { \ - /* get_bits8(level); */ \ - level = next32bits >> (10-flushed); \ - level &= 0xff; \ - flushed += 22; \ - assert(level >= 128); \ - } else if (temp != 128) { \ - /* Grab sign bit */ \ - flushed += 14; \ - level = ((int) (temp << 24)) >> 24; \ - } else { \ - /* get_bits8(level); */ \ - level = next32bits >> (10-flushed); \ - level &= 0xff; \ - flushed += 22; \ - level = level - 256; \ - assert(level <= -128 && level >= -255); \ - } \ - } \ - /* Update bitstream... */ \ - flush_bits(flushed); \ - assert (flushed <= 32); \ - } \ - } \ - else { \ - if (index == 2) { \ - /* show_bits10(index); */ \ - index = next32bits >> 22; \ - value = dct_coeff_tbl_2[index & 3]; \ - } \ - else if (index == 3) { \ - /* show_bits10(index); */ \ - index = next32bits >> 22; \ - value = dct_coeff_tbl_3[index & 3]; \ - } \ - else if (index) { /* index == 1 */ \ - /* show_bits12(index); */ \ - index = next32bits >> 20; \ - value = dct_coeff_tbl_1[index & 15]; \ - } \ - else { /* index == 0 */ \ - /* show_bits16(index); */ \ - index = next32bits >> 16; \ - value = dct_coeff_tbl_0[index & 255]; \ - } \ - run = value >> RUN_SHIFT; \ - level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \ - \ - /* \ - * Fold these operations together to make it fast... \ - */ \ - /* num_bits = (value & NUM_MASK) + 1; */ \ - /* flush_bits(num_bits); */ \ - /* get_bits1(value); */ \ - /* if (value) level = -level; */ \ - \ - flushed = (value & NUM_MASK) + 2; \ - value = next32bits >> (32-flushed); \ - value &= 0x1; \ - if (value) level = -level; \ - \ - /* Update bitstream ... */ \ - flush_bits(flushed); \ - assert (flushed <= 32); \ - } \ +#define DecodeDCTCoeff(dct_coeff_tbl, run, level) \ +{ \ + unsigned int temp, index; \ + unsigned int value, next32bits, flushed; \ + \ + /* \ + * Grab the next 32 bits and use it to improve performance of \ + * getting the bits to parse. Thus, calls are translated as: \ + * \ + * show_bitsX <--> next32bits >> (32-X) \ + * get_bitsX <--> val = next32bits >> (32-flushed-X); \ + * flushed += X; \ + * next32bits &= bitMask[flushed]; \ + * flush_bitsX <--> flushed += X; \ + * next32bits &= bitMask[flushed]; \ + * \ + * I've streamlined the code a lot, so that we don't have to mask \ + * out the low order bits and a few of the extra adds are removed. \ + */ \ + show_bits32(next32bits); \ + \ + /* show_bits8(index); */ \ + index = next32bits >> 24; \ + \ + if (index > 3) { \ + value = dct_coeff_tbl[index]; \ + run = value >> RUN_SHIFT; \ + if (run != END_OF_BLOCK) { \ + /* num_bits = (value & NUM_MASK) + 1; */ \ + /* flush_bits(num_bits); */ \ + if (run != ESCAPE) { \ + /* get_bits1(value); */ \ + /* if (value) level = -level; */ \ + flushed = (value & NUM_MASK) + 2; \ + level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \ + value = next32bits >> (32-flushed); \ + value &= 0x1; \ + if (value) level = -level; \ + /* next32bits &= ((~0) >> flushed); last op before update */ \ + } \ + else { /* run == ESCAPE */ \ + /* Get the next six into run, and next 8 into temp */ \ + /* get_bits14(temp); */ \ + flushed = (value & NUM_MASK) + 1; \ + temp = next32bits >> (18-flushed); \ + /* Normally, we'd ad 14 to flushed, but I've saved a few \ + * instr by moving the add below */ \ + temp &= 0x3fff; \ + run = temp >> 8; \ + temp &= 0xff; \ + if (temp == 0) { \ + /* get_bits8(level); */ \ + level = next32bits >> (10-flushed); \ + level &= 0xff; \ + flushed += 22; \ + assert(level >= 128); \ + } else if (temp != 128) { \ + /* Grab sign bit */ \ + flushed += 14; \ + level = ((int) (temp << 24)) >> 24; \ + } else { \ + /* get_bits8(level); */ \ + level = next32bits >> (10-flushed); \ + level &= 0xff; \ + flushed += 22; \ + level = level - 256; \ + assert(level <= -128 && level >= -255); \ + } \ + } \ + /* Update bitstream... */ \ + flush_bits(flushed); \ + assert (flushed <= 32); \ + } \ + } \ + else { \ + if (index == 2) { \ + /* show_bits10(index); */ \ + index = next32bits >> 22; \ + value = dct_coeff_tbl_2[index & 3]; \ + } \ + else if (index == 3) { \ + /* show_bits10(index); */ \ + index = next32bits >> 22; \ + value = dct_coeff_tbl_3[index & 3]; \ + } \ + else if (index) { /* index == 1 */ \ + /* show_bits12(index); */ \ + index = next32bits >> 20; \ + value = dct_coeff_tbl_1[index & 15]; \ + } \ + else { /* index == 0 */ \ + /* show_bits16(index); */ \ + index = next32bits >> 16; \ + value = dct_coeff_tbl_0[index & 255]; \ + } \ + run = value >> RUN_SHIFT; \ + level = (value & LEVEL_MASK) >> LEVEL_SHIFT; \ + \ + /* \ + * Fold these operations together to make it fast... \ + */ \ + /* num_bits = (value & NUM_MASK) + 1; */ \ + /* flush_bits(num_bits); */ \ + /* get_bits1(value); */ \ + /* if (value) level = -level; */ \ + \ + flushed = (value & NUM_MASK) + 2; \ + value = next32bits >> (32-flushed); \ + value &= 0x1; \ + if (value) level = -level; \ + \ + /* Update bitstream ... */ \ + flush_bits(flushed); \ + assert (flushed <= 32); \ + } \ } #define DecodeDCTCoeffFirst(runval, levelval) \ { \ DecodeDCTCoeff(dct_coeff_first, runval, levelval); \ -} +} #define DecodeDCTCoeffNext(runval, levelval) \ { \ @@ -302,12 +306,12 @@ extern unsigned short int dct_coeff_first[256]; * *-------------------------------------------------------------- */ -#define DecodeMBAddrInc(val) \ -{ \ - unsigned int index; \ - show_bits11(index); \ - val = mb_addr_inc[index].value; \ - flush_bits(mb_addr_inc[index].num_bits); \ +#define DecodeMBAddrInc(val) \ +{ \ + unsigned int index; \ + show_bits11(index); \ + val = mb_addr_inc[index].value; \ + flush_bits(mb_addr_inc[index].num_bits); \ } /* @@ -332,12 +336,12 @@ extern unsigned short int dct_coeff_first[256]; *-------------------------------------------------------------- */ -#define DecodeMotionVectors(value) \ -{ \ - unsigned int index; \ - show_bits11(index); \ - value = motion_vectors[index].code; \ - flush_bits(motion_vectors[index].num_bits); \ +#define DecodeMotionVectors(value) \ +{ \ + unsigned int index; \ + show_bits11(index); \ + value = motion_vectors[index].code; \ + flush_bits(motion_vectors[index].num_bits); \ } /* *-------------------------------------------------------------- @@ -361,18 +365,18 @@ extern unsigned short int dct_coeff_first[256]; * *-------------------------------------------------------------- */ -#define DecodeMBTypeB(quant, motion_fwd, motion_bwd, pat, intra) \ -{ \ - unsigned int index; \ - \ - show_bits6(index); \ - \ - quant = mb_type_B[index].mb_quant; \ - motion_fwd = mb_type_B[index].mb_motion_forward; \ - motion_bwd = mb_type_B[index].mb_motion_backward; \ - pat = mb_type_B[index].mb_pattern; \ - intra = mb_type_B[index].mb_intra; \ - flush_bits(mb_type_B[index].num_bits); \ +#define DecodeMBTypeB(quant, motion_fwd, motion_bwd, pat, intra) \ +{ \ + unsigned int index; \ + \ + show_bits6(index); \ + \ + quant = mb_type_B[index].mb_quant; \ + motion_fwd = mb_type_B[index].mb_motion_forward; \ + motion_bwd = mb_type_B[index].mb_motion_backward; \ + pat = mb_type_B[index].mb_pattern; \ + intra = mb_type_B[index].mb_intra; \ + flush_bits(mb_type_B[index].num_bits); \ } /* *-------------------------------------------------------------- @@ -395,21 +399,21 @@ extern unsigned short int dct_coeff_first[256]; * *-------------------------------------------------------------- */ -#define DecodeMBTypeI(quant, motion_fwd, motion_bwd, pat, intra) \ -{ \ - unsigned int index; \ - static int quantTbl[4] = {ERROR, 1, 0, 0}; \ - \ - show_bits2(index); \ - \ - motion_fwd = 0; \ - motion_bwd = 0; \ - pat = 0; \ - intra = 1; \ - quant = quantTbl[index]; \ - if (index) { \ - flush_bits (1 + quant); \ - } \ +#define DecodeMBTypeI(quant, motion_fwd, motion_bwd, pat, intra) \ +{ \ + unsigned int index; \ + static int quantTbl[4] = {ERROR, 1, 0, 0}; \ + \ + show_bits2(index); \ + \ + motion_fwd = 0; \ + motion_bwd = 0; \ + pat = 0; \ + intra = 1; \ + quant = quantTbl[index]; \ + if (index) { \ + flush_bits (1 + quant); \ + } \ } /* *-------------------------------------------------------------- @@ -433,19 +437,19 @@ extern unsigned short int dct_coeff_first[256]; * *-------------------------------------------------------------- */ -#define DecodeMBTypeP(quant, motion_fwd, motion_bwd, pat, intra) \ -{ \ - unsigned int index; \ - \ - show_bits6(index); \ - \ - quant = mb_type_P[index].mb_quant; \ - motion_fwd = mb_type_P[index].mb_motion_forward; \ - motion_bwd = mb_type_P[index].mb_motion_backward; \ - pat = mb_type_P[index].mb_pattern; \ - intra = mb_type_P[index].mb_intra; \ - \ - flush_bits(mb_type_P[index].num_bits); \ +#define DecodeMBTypeP(quant, motion_fwd, motion_bwd, pat, intra) \ +{ \ + unsigned int index; \ + \ + show_bits6(index); \ + \ + quant = mb_type_P[index].mb_quant; \ + motion_fwd = mb_type_P[index].mb_motion_forward; \ + motion_bwd = mb_type_P[index].mb_motion_backward; \ + pat = mb_type_P[index].mb_pattern; \ + intra = mb_type_P[index].mb_intra; \ + \ + flush_bits(mb_type_P[index].num_bits); \ } /* *-------------------------------------------------------------- @@ -466,11 +470,11 @@ extern unsigned short int dct_coeff_first[256]; * *-------------------------------------------------------------- */ -#define DecodeCBP(coded_bp) \ -{ \ - unsigned int index; \ - \ - show_bits9(index); \ - coded_bp = coded_block_pattern[index].cbp; \ - flush_bits(coded_block_pattern[index].num_bits); \ +#define DecodeCBP(coded_bp) \ +{ \ + unsigned int index; \ + \ + show_bits9(index); \ + coded_bp = coded_block_pattern[index].cbp; \ + flush_bits(coded_block_pattern[index].num_bits); \ } diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h index f11623f84a5..51320095ed5 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/dither.h @@ -2,17 +2,17 @@ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h index 6cf228bf60b..21991215259 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs2.h @@ -2,17 +2,17 @@ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS @@ -21,6 +21,10 @@ */ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + typedef struct { unsigned char value; int e1; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h index 2109c6f6691..96a93ee1878 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/fs4.h @@ -2,17 +2,17 @@ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS @@ -21,11 +21,15 @@ */ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + typedef struct { unsigned char value; int e1; - int e2; + int e2; int e3; - int e4; + int e4; } FS4Dither; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h index b7faf0b2827..40bb64b0985 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/global.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h index c421a53f167..085d1802ce0 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/mibload.h @@ -41,42 +41,42 @@ ftp from geom.umn.edu; email: software@geom.umn.edu. */ /*****************************************************************************/ typedef struct _mib_Widget { - char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ - int mib_class_num; /* class number for ez reference :) */ - int mib_mynum; /* numbering for storage format */ - Widget me; /* Xt widget */ - int mib_selected; /* is selected */ - int mib_resizing; /* is resizing 1, or being moved 0 */ - int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ - int mib_allowresize; /* can this widget be resized ? */ + char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ + int mib_class_num; /* class number for ez reference :) */ + int mib_mynum; /* numbering for storage format */ + Widget me; /* Xt widget */ + int mib_selected; /* is selected */ + int mib_resizing; /* is resizing 1, or being moved 0 */ + int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ + int mib_allowresize; /* can this widget be resized ? */ - int clkx, clky; /* where user clicked */ + int clkx, clky; /* where user clicked */ - void *myres; /* my resources (different for each widget) */ + void *myres; /* my resources (different for each widget) */ - char *name; /* reference name of this widget */ - int width, height; /* width and height */ + char *name; /* reference name of this widget */ + int width, height; /* width and height */ int topAttachment, bottomAttachment, leftAttachment, rightAttachment; - /* attachments 1=attached 0=not-attached */ + /* attachments 1=attached 0=not-attached */ int topOffset, bottomOffset, leftOffset, rightOffset; - /* offsets if attached */ + /* offsets if attached */ struct _mib_Widget *parent; /* pointer to parent */ struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */ - struct _mib_Widget *prev; /* previous sibling or parent */ - struct _mib_Widget *child; /* linked list of children widgets */ + struct _mib_Widget *prev; /* previous sibling or parent */ + struct _mib_Widget *child; /* linked list of children widgets */ } mib_Widget; /* mib_Buffer structure */ /*****************************************************************************/ typedef struct _mib_Buffer { - void *buffer; /* pointer to either a file or a char string */ - int buf_type; /* type of buffer (defined above) */ - int point; /* pointer for string */ - int buflen; /* length of string buffer */ + void *buffer; /* pointer to either a file or a char string */ + int buf_type; /* type of buffer (defined above) */ + int point; /* pointer for string */ + int buflen; /* length of string buffer */ } mib_Buffer; /* mib_Widget functions */ @@ -93,7 +93,7 @@ int mib_count_all(mib_Widget *, int); int mib_load_Root(Widget, mib_Widget **, mib_Buffer *); mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *); int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *, - mib_Buffer *); + mib_Buffer *); int mib_load_private(mib_Widget *, mib_Buffer *); void mib_reset_size(mib_Widget *); int mib_read_line(mib_Buffer *, char *, char *); @@ -118,38 +118,38 @@ Widget BuildMenu(Widget, int, char *, char, MenuItem *); /* mib class numbers */ -#define MIB_NULL 0 -#define MIB_TEXTBOX 1 -#define MIB_BUTTON 2 -#define MIB_TOGGLE 3 -#define MIB_RADIOBOX 4 -#define MIB_DRAWINGAREA 5 -#define MIB_LABEL 6 -#define MIB_FRAME 7 -#define MIB_SCROLLBAR 8 -#define MIB_TEXTBIG 9 -#define MIB_LIST 10 -#define MIB_SCALE 11 -#define MIB_MENU 12 +#define MIB_NULL 0 +#define MIB_TEXTBOX 1 +#define MIB_BUTTON 2 +#define MIB_TOGGLE 3 +#define MIB_RADIOBOX 4 +#define MIB_DRAWINGAREA 5 +#define MIB_LABEL 6 +#define MIB_FRAME 7 +#define MIB_SCROLLBAR 8 +#define MIB_TEXTBIG 9 +#define MIB_LIST 10 +#define MIB_SCALE 11 +#define MIB_MENU 12 /* number of classes */ -#define MI_NUMCLASSES 12 +#define MI_NUMCLASSES 12 /* for specifying creation of a widget with default private values, no values at all (empty), or no values and editable */ -#define WDEFAULT 1 -#define WEMPTY 2 -#define WEDIT 3 +#define WDEFAULT 1 +#define WEMPTY 2 +#define WEDIT 3 /* for specifing whether we are loading an interface from a file or from a string and whether it is editable :) */ -#define MI_FROMFILE 1 -#define MI_EDITFROMFILE 2 -#define MI_FROMSTRING 3 -#define MI_EDITFROMSTRING 4 +#define MI_FROMFILE 1 +#define MI_EDITFROMFILE 2 +#define MI_FROMSTRING 3 +#define MI_EDITFROMSTRING 4 -#define MI_MAXSTRLEN 200 /* maximum string length */ +#define MI_MAXSTRLEN 200 /* maximum string length */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h index 7dab93d341d..9df0e313bbb 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/newproto.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h index 762a66d184d..023cd981944 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/proto.h @@ -2,7 +2,7 @@ #ifdef __STDC__ -# define P(s) s +# define P(s) s #else # define P(s) () #endif @@ -91,11 +91,11 @@ void GrayDitherImage P((unsigned char *lum , unsigned char *cr , unsigned char * /* mono.c */ void MonoDitherImage(register unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w); + unsigned char *cb, unsigned char *out, + int h, int w); void MonoThresholdImage(unsigned char *lum, unsigned char *cr, - unsigned char *cb, unsigned char *out, - int h, int w); + unsigned char *cb, unsigned char *out, + int h, int w); /* jrevdct.c */ void init_pre_idct P((void )); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h index b1ce065cc10..a77b5fdbb4e 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/ui.h @@ -9,9 +9,9 @@ ftp from geom.umn.edu; email: software@geom.umn.edu. */ /* Author: Daeron Meyer */ -void UICreate(); -void UIEnd(); -Window MonitorWindow(); +void UICreate(); +void UIEnd(); +Window MonitorWindow(); void UISetwin(Window); void UIMinsize(int, int); void UISetFrame(); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h index 272e0add31d..3c68ea365cd 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/util.h @@ -2,17 +2,17 @@ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS @@ -22,7 +22,7 @@ /* Status codes for bit stream i/o operations. */ -#if !defined (AV_UTIL_H) +#ifndef AV_UTIL_H #define AV_UTIL_H #define NO_VID_STREAM -1 @@ -199,13 +199,13 @@ extern unsigned int *bitBuffer; #define get_bitsn(num, result) get_bitsX((num), nBitMask[num], (32-(num)), result) #ifdef NO_SANITY_CHECKS -#define show_bits32(result) \ +#define show_bits32(result) \ { \ - if (bitOffset) { \ - result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \ + if (bitOffset) { \ + result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \ } \ else { \ - result = curBits; \ + result = curBits; \ } \ } @@ -224,17 +224,17 @@ extern unsigned int *bitBuffer; } #else -#define show_bits32(result) \ +#define show_bits32(result) \ { \ /* Check for underflow. */ \ /* if (bufLength < 2) { \ correct_underflow(); \ } */ \ - if (bitOffset) { \ - result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \ + if (bitOffset) { \ + result = curBits | (*(bitBuffer+1) >> (32 - bitOffset)); \ } \ else { \ - result = curBits; \ + result = curBits; \ } \ } diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h index 13096759702..c8940e2a517 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_client/video.h @@ -2,17 +2,17 @@ /* * Copyright (c) 1992 The Regents of the University of California. * All rights reserved. - * + * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. - * + * * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * + * * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS @@ -40,7 +40,7 @@ typedef char INT8; typedef unsigned int UINT32; typedef unsigned short UINT16; typedef unsigned char UINT8; - + /* Define Parsing error codes. */ #define SKIP_PICTURE -10 @@ -132,7 +132,7 @@ typedef struct GoP { unsigned int tc_seconds; /* Second component of time code. */ unsigned int tc_pictures; /* Picture counter of time code. */ BOOLEAN closed_gop; /* Indicates no pred. vectors to - previous group of pictures. */ + previous group of pictures. */ BOOLEAN broken_link; /* B frame unable to be decoded. */ char *ext_data; /* Extension data. */ char *user_data; /* User data. */ @@ -145,11 +145,11 @@ typedef struct pict { unsigned int code_type; /* Frame type: P, B, I */ unsigned int vbv_delay; /* Buffer delay. */ BOOLEAN full_pel_forw_vector; /* Forw. vectors specified in full - pixel values flag. */ + pixel values flag. */ unsigned int forw_r_size; /* Used for vector decoding. */ unsigned int forw_f; /* Used for vector decoding. */ - BOOLEAN full_pel_back_vector; /* Back vectors specified in full - pixel values flag. */ + BOOLEAN full_pel_back_vector; /* Back vectors specified in full + pixel values flag. */ unsigned int back_r_size; /* Used in decoding. */ unsigned int back_f; /* Used in decoding. */ char *extra_info; /* Extra bit picture info. */ @@ -212,12 +212,12 @@ typedef struct vid_stream { unsigned int vbv_buffer_size; /* Minimum buffer size. */ BOOLEAN const_param_flag; /* Contrained parameter flag. */ unsigned char intra_quant_matrix[8][8]; /* Quantization matrix for - intracoded frames. */ - unsigned char non_intra_quant_matrix[8][8]; /* Quanitization matrix for - non intracoded frames. */ + intracoded frames. */ + unsigned char non_intra_quant_matrix[8][8]; /* Quanitization matrix for + non intracoded frames. */ char *ext_data; /* Extension data. */ char *user_data; /* User data. */ - int gopid; /* id of latest group id */ + int gopid; /* id of latest group id */ GoP group; /* Current group of pict. */ Pict picture; /* Current picture. */ Slice slice; /* Current slice. */ @@ -226,7 +226,7 @@ typedef struct vid_stream { int state; /* State of decoding. */ int bit_offset; /* Bit offset in stream. */ unsigned int *buffer; /* Pointer to next byte in - buffer. */ + buffer. */ int buf_length; /* Length of remaining buffer.*/ unsigned int *buf_start; /* Pointer to buffer start. */ int max_buf_length; /* Max lenght of buffer. */ @@ -234,7 +234,7 @@ typedef struct vid_stream { PictImage *future; /* Future predictive frame. */ PictImage *current; /* Current frame. */ PictImage *ring[RING_BUF_SIZE]; /* Ring buffer of frames. */ -} VidStream; +} VidStream; /* Declaration of global pointer to current video stream. */ @@ -257,14 +257,14 @@ extern char *ditherFlags; #define CONST_BITS 13 /* Misc DCT definitions */ -#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ -#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ + +#define GLOBAL /* a function referenced thru EXTERNs */ -#define GLOBAL /* a function referenced thru EXTERNs */ - typedef short DCTELEM; typedef DCTELEM DCTBLOCK[DCTSIZE2]; - + #ifdef SH_MEM extern int gXErrorFlag; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h index 3b20908a333..050dd00c110 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibload.h @@ -37,47 +37,51 @@ ftp from geom.umn.edu; email: software@geom.umn.edu. */ #include <Xm/MwmUtil.h> #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + /* Structure of mib_Widget */ /*****************************************************************************/ typedef struct _mib_Widget { - char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ - int mib_class_num; /* class number for ez reference :) */ - int mib_mynum; /* numbering for storage format */ - Widget me; /* Xt widget */ - int mib_selected; /* is selected */ - int mib_resizing; /* is resizing 1, or being moved 0 */ - int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ - int mib_allowresize; /* can this widget be resized ? */ + char *mib_class; /* name of mib class (Button, TextBox, etc..)*/ + int mib_class_num; /* class number for ez reference :) */ + int mib_mynum; /* numbering for storage format */ + Widget me; /* Xt widget */ + int mib_selected; /* is selected */ + int mib_resizing; /* is resizing 1, or being moved 0 */ + int mib_resizetype;/* 1 = upper left, 2 = upper, 3 = ... */ + int mib_allowresize; /* can this widget be resized ? */ - int clkx, clky; /* where user clicked */ + int clkx, clky; /* where user clicked */ - void *myres; /* my resources (different for each widget) */ + void *myres; /* my resources (different for each widget) */ - char *name; /* reference name of this widget */ - int width, height; /* width and height */ + char *name; /* reference name of this widget */ + int width, height; /* width and height */ int topAttachment, bottomAttachment, leftAttachment, rightAttachment; - /* attachments 1=attached 0=not-attached */ + /* attachments 1=attached 0=not-attached */ int topOffset, bottomOffset, leftOffset, rightOffset; - /* offsets if attached */ + /* offsets if attached */ struct _mib_Widget *parent; /* pointer to parent */ struct _mib_Widget *sibling; /* remaining linked list of sibling widgets */ - struct _mib_Widget *prev; /* previous sibling or parent */ - struct _mib_Widget *child; /* linked list of children widgets */ + struct _mib_Widget *prev; /* previous sibling or parent */ + struct _mib_Widget *child; /* linked list of children widgets */ } mib_Widget; /* mib_Buffer structure */ /*****************************************************************************/ typedef struct _mib_Buffer { - void *buffer; /* pointer to either a file or a char string */ - int buf_type; /* type of buffer (defined above) */ - int point; /* pointer for string */ - int buflen; /* length of string buffer */ + void *buffer; /* pointer to either a file or a char string */ + int buf_type; /* type of buffer (defined above) */ + int point; /* pointer for string */ + int buflen; /* length of string buffer */ } mib_Buffer; /* mib_Widget functions */ @@ -98,7 +102,7 @@ int mib_count_all(mib_Widget *, int); int mib_load_Root(Widget, mib_Widget **, mib_Buffer *); mib_Widget *mib_load_public(mib_Widget *, mib_Widget *, mib_Buffer *); int mib_load_mib_class(mib_Widget **, mib_Widget *, char *, char *, - mib_Buffer *); + mib_Buffer *); int mib_load_private(mib_Widget *, mib_Buffer *); void mib_reset_size(mib_Widget *); int mib_read_line(mib_Buffer *, char *, char *); @@ -131,38 +135,38 @@ Widget BuildMenu(Widget, int, char *, char, MenuItem *); /* mib class numbers */ -#define MIB_NULL 0 -#define MIB_TEXTBOX 1 -#define MIB_BUTTON 2 -#define MIB_TOGGLE 3 -#define MIB_RADIOBOX 4 -#define MIB_DRAWINGAREA 5 -#define MIB_LABEL 6 -#define MIB_FRAME 7 -#define MIB_SCROLLBAR 8 -#define MIB_TEXTBIG 9 -#define MIB_LIST 10 -#define MIB_SCALE 11 -#define MIB_MENU 12 +#define MIB_NULL 0 +#define MIB_TEXTBOX 1 +#define MIB_BUTTON 2 +#define MIB_TOGGLE 3 +#define MIB_RADIOBOX 4 +#define MIB_DRAWINGAREA 5 +#define MIB_LABEL 6 +#define MIB_FRAME 7 +#define MIB_SCROLLBAR 8 +#define MIB_TEXTBIG 9 +#define MIB_LIST 10 +#define MIB_SCALE 11 +#define MIB_MENU 12 /* number of classes */ -#define MI_NUMCLASSES 12 +#define MI_NUMCLASSES 12 /* for specifying creation of a widget with default private values, no values at all (empty), or no values and editable */ -#define WDEFAULT 1 -#define WEMPTY 2 -#define WEDIT 3 +#define WDEFAULT 1 +#define WEMPTY 2 +#define WEDIT 3 /* for specifing whether we are loading an interface from a file or from a string and whether it is editable :) */ -#define MI_FROMFILE 1 -#define MI_EDITFROMFILE 2 -#define MI_FROMSTRING 3 -#define MI_EDITFROMSTRING 4 +#define MI_FROMFILE 1 +#define MI_EDITFROMFILE 2 +#define MI_FROMSTRING 3 +#define MI_EDITFROMSTRING 4 -#define MI_MAXSTRLEN 200 /* maximum string length */ +#define MI_MAXSTRLEN 200 /* maximum string length */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h index 778e2338682..5d38ec199b8 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_mib/mibwidgets.h @@ -13,14 +13,14 @@ ftp from geom.umn.edu; email: software@geom.umn.edu. */ /*****************************************************************************/ typedef struct _mib_TextBox { - char *init_contents; /* initial text contents */ + char *init_contents; /* initial text contents */ } mib_TextBox; /* mib_TextBox functions */ /*****************************************************************************/ mib_Widget *mib_create_TextBox(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_TextBox(mib_Widget *); void mib_save_TextBox(mib_Widget *, FILE *); int mib_load_TextBox(mib_Widget *, mib_Buffer *); @@ -30,14 +30,14 @@ int mib_load_TextBox(mib_Widget *, mib_Buffer *); /*****************************************************************************/ typedef struct _mib_Button { - char *label; /* label on button */ + char *label; /* label on button */ } mib_Button; /* mib_Button functions */ /*****************************************************************************/ mib_Widget *mib_create_Button(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_Button(mib_Widget *); void mib_save_Button(mib_Widget *, FILE *); int mib_load_Button(mib_Widget *, mib_Buffer *); @@ -47,7 +47,7 @@ int mib_load_Button(mib_Widget *, mib_Buffer *); /*****************************************************************************/ typedef struct _mib_Toggle { - char *label; /* label on toggle */ + char *label; /* label on toggle */ int isize; } mib_Toggle; @@ -55,7 +55,7 @@ typedef struct _mib_Toggle { /* mib_Toggle functions */ /*****************************************************************************/ mib_Widget *mib_create_Toggle(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_Toggle(mib_Widget *); void mib_save_Toggle(mib_Widget *, FILE *); int mib_load_Toggle(mib_Widget *, mib_Buffer *); @@ -64,9 +64,9 @@ int mib_load_Toggle(mib_Widget *, mib_Buffer *); /* Structure of mib_RadioBox */ /*****************************************************************************/ typedef struct _mib_RadioBox { - char **labels; /* array of labels */ - int numlabel; /* number of labels */ - Widget *buttons; /* pointers to each button */ + char **labels; /* array of labels */ + int numlabel; /* number of labels */ + Widget *buttons; /* pointers to each button */ } mib_RadioBox; @@ -74,7 +74,7 @@ typedef struct _mib_RadioBox { /*****************************************************************************/ mib_Widget *mib_create_RadioBox(mib_Widget *, char *, char*, int, int, int, - int, int); + int, int); void mib_delete_RadioBox(mib_Widget *); void mib_save_RadioBox(mib_Widget *, FILE *); int mib_load_RadioBox(mib_Widget *, mib_Buffer *); @@ -83,14 +83,14 @@ int mib_load_RadioBox(mib_Widget *, mib_Buffer *); /* Structure of mib_DrawingArea */ /*****************************************************************************/ typedef struct _mib_DrawingArea { - int nothing; /* couldn't think of anything yet */ + int nothing; /* couldn't think of anything yet */ } mib_DrawingArea; /* mib_DrawingArea functions */ /*****************************************************************************/ mib_Widget *mib_create_DrawingArea(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_DrawingArea(mib_Widget *); void mib_save_DrawingArea(mib_Widget *, FILE *); int mib_load_DrawingArea(mib_Widget *, mib_Buffer *); @@ -99,14 +99,14 @@ int mib_load_DrawingArea(mib_Widget *, mib_Buffer *); /* Structure of mib_Label */ /*****************************************************************************/ typedef struct _mib_Label { - char *label; /* text in label */ + char *label; /* text in label */ } mib_Label; /* mib_Label functions */ /*****************************************************************************/ mib_Widget *mib_create_Label(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_Label(mib_Widget *); void mib_save_Label(mib_Widget *, FILE *); int mib_load_Label(mib_Widget *, mib_Buffer *); @@ -115,14 +115,14 @@ int mib_load_Label(mib_Widget *, mib_Buffer *); /* Structure of mib_Frame */ /*****************************************************************************/ typedef struct _mib_Frame { - int shadowtype; /* 0 = in, 1 = out, 2 = etched_in, 3 = etched_out */ + int shadowtype; /* 0 = in, 1 = out, 2 = etched_in, 3 = etched_out */ } mib_Frame; /* mib_Frame functions */ /*****************************************************************************/ mib_Widget *mib_create_Frame(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_Frame(mib_Widget *); void mib_save_Frame(mib_Widget *, FILE *); int mib_load_Frame(mib_Widget *, mib_Buffer *); @@ -131,14 +131,14 @@ int mib_load_Frame(mib_Widget *, mib_Buffer *); /* Structure of mib_ScrollBar */ /*****************************************************************************/ typedef struct _mib_ScrollBar { - int orientation; + int orientation; } mib_ScrollBar; /* mib_ScrollBar functions */ /*****************************************************************************/ mib_Widget *mib_create_ScrollBar(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_ScrollBar(mib_Widget *); void mib_save_ScrollBar(mib_Widget *, FILE *); int mib_load_ScrollBar(mib_Widget *, mib_Buffer *); @@ -147,7 +147,7 @@ int mib_load_ScrollBar(mib_Widget *, mib_Buffer *); /* Structure of mib_TextBig */ /*****************************************************************************/ typedef struct _mib_TextBig { - int nothing; /* couldn't think of anything yet */ + int nothing; /* couldn't think of anything yet */ } mib_TextBig; @@ -169,7 +169,7 @@ typedef struct _mib_List { /* mib_List functions */ /*****************************************************************************/ mib_Widget *mib_create_List(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_List(mib_Widget *); void mib_save_List(mib_Widget *, FILE *); int mib_load_List(mib_Widget *, mib_Buffer *); @@ -192,16 +192,16 @@ int mib_load_Scale(mib_Widget *, mib_Buffer *); /* Structure of mib_Menu */ /*****************************************************************************/ typedef struct _mib_Menu { - int numitems; /* number of items in menu*/ - MenuItem *my_menu; /* array of menu items */ - Widget *items; /* pointers to each item */ + int numitems; /* number of items in menu*/ + MenuItem *my_menu; /* array of menu items */ + Widget *items; /* pointers to each item */ } mib_Menu; /* mib_Menu functions */ /*****************************************************************************/ mib_Widget *mib_create_Menu(mib_Widget *, char *, char *, int, int, int, - int, int); + int, int); void mib_delete_Menu(mib_Widget *); void mib_save_Menu(mib_Widget *, FILE *); int mib_load_Menu(mib_Widget *, mib_Buffer *); @@ -209,17 +209,17 @@ int mib_load_Menu(mib_Widget *, mib_Buffer *); /*****************************************************************************/ typedef struct _mib_widget_funcs { - char *name; + char *name; #ifdef __cplusplus - mib_Widget *(*mib_create)(mib_Widget *parent, char *name, char *label, - int posx, int posy, int width, int height, int mib_fill); - void (*mib_delete)(mib_Widget *thisw); - void (*mib_save)(mib_Widget *thisw, FILE *fout); - int (*mib_load)(mib_Widget *thisw, mib_Buffer *fin); + mib_Widget *(*mib_create)(mib_Widget *parent, char *name, char *label, + int posx, int posy, int width, int height, int mib_fill); + void (*mib_delete)(mib_Widget *thisw); + void (*mib_save)(mib_Widget *thisw, FILE *fout); + int (*mib_load)(mib_Widget *thisw, mib_Buffer *fin); #else - mib_Widget *(*mib_create)(); - void (*mib_delete)(); - void (*mib_save)(); - int (*mib_load)(); + mib_Widget *(*mib_create)(); + void (*mib_delete)(); + void (*mib_save)(); + int (*mib_load)(); #endif } mib_widget_funcs; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h index e088d097403..e585f00f01b 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_State.h @@ -1,10 +1,15 @@ /* _*_ C++ _*_ */ // $Id$ -#if !defined (_MPEG_AUDIO_CONTROL_STATE_H) +#ifndef _MPEG_AUDIO_CONTROL_STATE_H #define _MPEG_AUDIO_CONTROL_STATE_H #include "ace/Singleton.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "mpeg_shared/Audio_ControlS.h" #include "Globals.h" @@ -30,7 +35,7 @@ public: virtual CORBA::Boolean play (const Audio_Control::PLAYPara & para, CORBA::Long_out ats) ; - + virtual CORBA::Boolean speed (const Audio_Control::SPEEDPara & para) ; virtual CORBA::Boolean stop (CORBA::Long cmdsn) ; @@ -38,13 +43,13 @@ public: virtual void close (void) ; protected: Audio_States state_; - // The state + // The state Audio_Global *audio_global_; // Pointer to the global. Audio_Control_i *audio_control_i_; }; - + class Audio_Control_Waiting_State : public virtual Audio_Control_State { @@ -72,8 +77,8 @@ public: }; typedef ACE_Singleton <Audio_Control_Waiting_State, ACE_SYNCH_MUTEX> - AUDIO_CONTROL_WAITING_STATE; + AUDIO_CONTROL_WAITING_STATE; typedef ACE_Singleton <Audio_Control_Play_State, ACE_SYNCH_MUTEX> - AUDIO_CONTROL_PLAY_STATE; + AUDIO_CONTROL_PLAY_STATE; #endif /*_MPEG_AUDIO_CONTROL_STATE_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h index d6c7c74c2d0..001bfccb423 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Control_i.h @@ -1,7 +1,7 @@ /* _*_ C++ _*_ */ //$Id$ -#if !defined (_AV_AUDIO_CONTROL_H) +#ifndef _AV_AUDIO_CONTROL_H #define _AV_AUDIO_CONTROL_H #include "mpeg_shared/Audio_ControlS.h" @@ -19,7 +19,7 @@ public: ~Audio_Control_i (void); // Default destructor - + int create_handlers (void); // creates the data and sig handlers. @@ -53,23 +53,23 @@ public: virtual void close ( CORBA::Environment &_tao_environment ) ; - + void change_state (Audio_Control_State *state); // Changes the state of the Audio Control object. - + Audio_Control_State *get_state (void); // gets the state. private: int register_handlers (void); - + ACE_Reactor *reactor_; - + Audio_Control_State *state_; - + Audio_Data_Handler *data_handler_; - + Audio_Sig_Handler *sig_handler_; - + ACE_SOCK_CODgram dgram_; Audio_Global *audio_global_; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h index 8f80cf0834a..473827a2adb 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Audio_Server.h @@ -1,7 +1,7 @@ /* -*- C++ -*- */ //$Id$ -#if !defined (_AUDIO_SERVER_H) +#ifndef _AUDIO_SERVER_H #define _AUDIO_SERVER_H #include <sys/types.h> @@ -28,13 +28,18 @@ #include "server_proto.h" #include "ace/SOCK_CODgram.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/SOCK_Stream.h" #include "tao/TAO.h" #include "mpeg_shared/Audio_ControlS.h" #include "orbsvcs/CosNamingC.h" #include "Globals.h" -class Audio_Sig_Handler +class Audio_Sig_Handler : public virtual ACE_Event_Handler { // = TITLE @@ -49,7 +54,7 @@ public: // this will register this sig_handler // with the reactor for SIGALRM - virtual int shutdown (ACE_HANDLE, + virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); virtual int handle_input (ACE_HANDLE); @@ -68,7 +73,7 @@ class Audio_Data_Handler : public virtual ACE_Event_Handler public: Audio_Data_Handler (ACE_HANDLE data_fd, Audio_Global *audio_global); - + // Constructor virtual int handle_input (ACE_HANDLE fd = ACE_INVALID_HANDLE); @@ -96,17 +101,17 @@ public: virtual int handle_stop (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, + + virtual int handle_start (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, + + virtual int handle_destroy (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; private: diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h index 74f74cfb5d5..c7740c4ccda 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Globals.h @@ -2,22 +2,22 @@ // $Id$ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -25,24 +25,29 @@ * email: scen@cse.ogi.edu */ -#if !defined (MPEG_GLOBAL_H) +#ifndef MPEG_GLOBAL_H #define MPEG_GLOBAL_H #include "ace/SOCK_CODgram.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + // Global symbols, these need to become enums eventually. #define SESSION_NUM 4 -#define CONN_INET 1 -#define CONN_UNIX 2 -#define CONN_ATM 3 +#define CONN_INET 1 +#define CONN_UNIX 2 +#define CONN_ATM 3 -#define SERVER_FDTABLE_SIZE 50 -#define CLIENT_FDTABLE_SIZE 10 +#define SERVER_FDTABLE_SIZE 50 +#define CLIENT_FDTABLE_SIZE 10 -#define STATE_PENDING 1 -#define STATE_CONTROL 2 -#define STATE_DATA 3 -#define STATE_SINGLE 4 +#define STATE_PENDING 1 +#define STATE_CONTROL 2 +#define STATE_DATA 3 +#define STATE_SINGLE 4 #define min(a, b) ((a) > (b) ? (b) : (a)) #define max(a, b) ((a) > (b) ? (a) : (b)) @@ -63,49 +68,49 @@ // Global definitions #define nextByte {int val; fileptr ++; \ - if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \ - {\ - perror("Crossed EOF or error while scanning"); \ - return 1; \ - } nb = val;} + if ((val = getc(VIDEO_SINGLETON::instance ()->fp)) == EOF) \ + {\ + perror("Crossed EOF or error while scanning"); \ + return 1; \ + } nb = val;} #define computePicSize \ - if (inpic) \ - { \ - if (pictype == 'I') \ - { \ - VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \ - } \ - else if (pictype == 'P') \ - { \ - VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \ - } \ - else \ - { \ - VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \ - VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \ - } \ - VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \ - VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \ - inpic = 0; \ - } + if (inpic) \ + { \ + if (pictype == 'I') \ + { \ + VIDEO_SINGLETON::instance ()->maxI = max(VIDEO_SINGLETON::instance ()->maxI, (int)(fileptr - picptr - 4)); \ + VIDEO_SINGLETON::instance ()->minI = min(VIDEO_SINGLETON::instance ()->minI, (int)(fileptr - picptr - 4)); \ + } \ + else if (pictype == 'P') \ + { \ + VIDEO_SINGLETON::instance ()->maxP = max(VIDEO_SINGLETON::instance ()->maxP, (int)(fileptr - picptr - 4)); \ + VIDEO_SINGLETON::instance ()->minP = min(VIDEO_SINGLETON::instance ()->minP, (int)(fileptr - picptr - 4)); \ + } \ + else \ + { \ + VIDEO_SINGLETON::instance ()->maxB = max(VIDEO_SINGLETON::instance ()->maxB, (int)(fileptr - picptr - 4)); \ + VIDEO_SINGLETON::instance ()->minB = min(VIDEO_SINGLETON::instance ()->minB, (int)(fileptr - picptr - 4)); \ + } \ + VIDEO_SINGLETON::instance ()->frameTable[ftptr].type = pictype; \ + VIDEO_SINGLETON::instance ()->frameTable[ftptr++].size = (int)(fileptr - picptr - 4); \ + inpic = 0; \ + } #define FileRead(position, buf, size) \ - { \ - if (fseek(VIDEO_SINGLETON::instance ()->fp, (position), 0) == -1) \ - { \ - perror("VS error on fseek VideoFile"); \ - return (-1); \ - } \ - while (fread((buf), (size), 1, VIDEO_SINGLETON::instance ()->fp) == 0) \ - { if (errno == EINTR) { errno = 0; continue;}\ + { \ + if (fseek(VIDEO_SINGLETON::instance ()->fp, (position), 0) == -1) \ + { \ + perror("VS error on fseek VideoFile"); \ + return (-1); \ + } \ + while (fread((buf), (size), 1, VIDEO_SINGLETON::instance ()->fp) == 0) \ + { if (errno == EINTR) { errno = 0; continue;}\ perror("VS error on fread VideoFile"); \ return (-1); \ - } \ - } + } \ + } #define CheckFrameRange(pnextFrame) \ { if ((pnextFrame) < 0 || (pnextFrame) >= VIDEO_SINGLETON::instance ()->numF) \ @@ -121,7 +126,7 @@ #include "include/common.h" #include "mpeg_shared/routine.h" #include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" +#include "mpeg_shared/com.h" #include "mpeg_shared/sendpt.h" #include "mpeg_server/server_proto.h" #include "mpeg_server/Video_Server.h" @@ -205,7 +210,7 @@ public: int fileSize; int maxS; - int maxG; + int maxG; int maxI; int maxP; int maxB; @@ -252,7 +257,7 @@ public: char type; unsigned short size; } * frameTable; - + int preGroup; int preHeader; int preFrame; @@ -266,10 +271,10 @@ public: // globals functions int CmdRead (char *buf, int psize); int CmdWrite (char *buf, int size); - int SendPacket (int shtag, - int gop, - int frame, - int timeToUse, + int SendPacket (int shtag, + int gop, + int frame, + int timeToUse, int first_time = 0); int FBread (char *buf, int size); int PLAYliveVideo (PLAYpara * para); @@ -358,7 +363,7 @@ public: int addSamples; unsigned nextTime; int upp; /* micro-seconds per packet */ - int delta_sps ; + int delta_sps ; // The members previously in PLAY audio. int bytes_sent ; @@ -389,6 +394,6 @@ public: typedef ACE_Singleton <Audio_Global,ACE_SYNCH_MUTEX> AUDIO_GLOBAL; - + #endif /* define MPEG_GLOBAL_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h index d9af5a73250..9363a48ea0d 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_State.h @@ -4,22 +4,22 @@ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -27,10 +27,15 @@ * email: scen@cse.ogi.edu */ -#if !defined (MPEG_VIDEO_CONTROL_STATE_H) +#ifndef MPEG_VIDEO_CONTROL_STATE_H #define MPEG_VIDEO_CONTROL_STATE_H #include "ace/Singleton.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "mpeg_shared/Video_ControlS.h" #include "mpeg_server/Video_Control_i.h" @@ -50,7 +55,7 @@ public: Video_Control_State (void); // constructor - enum Video_States + enum Video_States { VIDEO_WAITING, VIDEO_PLAY = 1, @@ -66,12 +71,12 @@ public: virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara ¶, Video_Control::INITvideoReply_out reply) ; - + virtual CORBA::Boolean stat_stream (CORBA::Char_out ch, CORBA::Long_out size); virtual void close (void); - + virtual CORBA::Boolean stat_sent (void); virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶) ; @@ -79,7 +84,7 @@ public: virtual CORBA::Boolean fast_backward (const Video_Control::FFpara ¶) ; virtual CORBA::Boolean step (const Video_Control::STEPpara ¶) ; - + virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶, CORBA::Long_out vts) ; @@ -88,13 +93,13 @@ public: virtual CORBA::Boolean speed (const Video_Control::SPEEDpara ¶) ; virtual CORBA::Boolean stop (CORBA::Long cmdsn) ; - + protected: Video_States state_; // State of this object Video_Control_i *vci_; - + }; class Video_Control_Waiting_State : public virtual Video_Control_State @@ -105,20 +110,20 @@ class Video_Control_Waiting_State : public virtual Video_Control_State public: Video_Control_Waiting_State (void); // Default constructor, sets the state to WAITING - + virtual CORBA::Boolean stat_stream (CORBA::Char_out ch, CORBA::Long_out size); - + virtual void close (void); - + virtual CORBA::Boolean stat_sent (void); - + virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶); - + virtual CORBA::Boolean fast_backward (const Video_Control::FFpara ¶); virtual CORBA::Boolean step (const Video_Control::STEPpara ¶); - + virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶, CORBA::Long_out vts); @@ -173,9 +178,9 @@ public: }; typedef ACE_Singleton <Video_Control_Waiting_State, ACE_SYNCH_MUTEX> - VIDEO_CONTROL_WAITING_STATE; + VIDEO_CONTROL_WAITING_STATE; typedef ACE_Singleton <Video_Control_Play_State, ACE_SYNCH_MUTEX> - VIDEO_CONTROL_PLAY_STATE; + VIDEO_CONTROL_PLAY_STATE; typedef ACE_Singleton <Video_Control_Fast_Forward_State, ACE_SYNCH_MUTEX> VIDEO_CONTROL_FAST_FORWARD_STATE; typedef ACE_Singleton <Video_Control_Fast_Backward_State, ACE_SYNCH_MUTEX> diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h index 52e5d0f96b1..55b782a0e97 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Control_i.h @@ -1,7 +1,7 @@ /* -*- C++ -*- */ // $Id$ -#if !defined (AV_VIDEO_CONTROL_H) +#ifndef AV_VIDEO_CONTROL_H #define AV_VIDEO_CONTROL_H #include "mpeg_shared/Video_ControlS.h" @@ -24,13 +24,13 @@ public: virtual CORBA::Boolean init_video (const Video_Control::INITvideoPara ¶, Video_Control::INITvideoReply_out reply, CORBA::Environment &_tao_environment); - + virtual CORBA::Boolean stat_stream (CORBA::Char_out ch, CORBA::Long_out size, CORBA::Environment &_tao_environment); virtual void close (CORBA::Environment &_tao_environment); - + virtual CORBA::Boolean stat_sent (CORBA::Environment &_tao_environment); virtual CORBA::Boolean fast_forward (const Video_Control::FFpara ¶, @@ -42,7 +42,7 @@ public: virtual CORBA::Boolean step (const Video_Control::STEPpara ¶, CORBA::Environment &_tao_environment); - + virtual CORBA::Boolean play (const Video_Control::PLAYpara ¶, CORBA::Long_out vts, CORBA::Environment &_tao_environment); @@ -58,14 +58,14 @@ public: virtual CORBA::Boolean set_peer (char * &peer, CORBA::Environment &_tao_environment); - // called by the client to inform us about it's ip and + // called by the client to inform us about it's ip and // udp address. void change_state (Video_Control_State *state); // Used to change the state Video_Control_State *get_state (void); - // Accessor for the state_ + // Accessor for the state_ virtual ~Video_Control_i (void); // Destructor diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h index e50b1ec373e..29ba6ea2d7a 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/Video_Server.h @@ -3,22 +3,22 @@ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -26,16 +26,21 @@ * email: scen@cse.ogi.edu */ -#if !defined (MPEG_VIDEO_SERVER_H) +#ifndef MPEG_VIDEO_SERVER_H #define MPEG_VIDEO_SERVER_H #include "ace/Reactor.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Event_Handler.h" #include "tao/TAO.h" #include "include/common.h" #include "mpeg_shared/fileio.h" -#include "mpeg_shared/com.h" +#include "mpeg_shared/com.h" #include "mpeg_shared/routine.h" #include "mpeg_shared/sendpt.h" #include "mpeg_shared/Video_ControlS.h" @@ -47,7 +52,7 @@ class Video_Control_i; -class Video_Sig_Handler +class Video_Sig_Handler : public virtual ACE_Event_Handler { // = TITLE @@ -69,7 +74,7 @@ public: // this will register this sig_handler // with the reactor for SIGALRM - virtual int shutdown (ACE_HANDLE, + virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); virtual int handle_input (ACE_HANDLE); @@ -109,7 +114,7 @@ public: private: Video_Control_i *vci_; - + }; // The stream endpoint @@ -126,22 +131,22 @@ public: virtual int handle_stop (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - - virtual int handle_start (const AVStreams::flowSpec &the_spec, + + virtual int handle_start (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - - virtual int handle_destroy (const AVStreams::flowSpec &the_spec, + + virtual int handle_destroy (const AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; // Application needs to define this - virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, + virtual CORBA::Boolean handle_connection_requested (AVStreams::flowSpec &the_spec, CORBA::Environment &env) ; private: ACE_SOCK_CODgram dgram_; - + }; #endif /* MPEG_VIDEO_SERVER_H */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h index 12aab8421c5..2076b2921c5 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_server/server_proto.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -43,11 +43,11 @@ void LeaveLiveVideo(void); /* each child forked not doing live video should call this */ void ExitLiveVideo(void); int OpenLiveVideo(int * format, - int * width, int * height, - int * averageFrameSize, - double * fps, - int * pelAspactRatio /* MPEG1 encoding used here */ - ); /* -1 -- failed, 0 - succ */ + int * width, int * height, + int * averageFrameSize, + double * fps, + int * pelAspactRatio /* MPEG1 encoding used here */ + ); /* -1 -- failed, 0 - succ */ void StartPlayLiveVideo(void); void StopPlayLiveVideo(void); int ReadLiveVideoPicture(int * frame, char * buf, int size); /* ret # bytes */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h index 98e82aeb26c..cf97b4b1796 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/com.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -26,32 +26,32 @@ /* Some assumptions about the streams created in this file: - PACKET STREAM: - - * send(), recv() may not work, we can only use - read()/write(). - - * write(): either send the whole packet, or send nothing + PACKET STREAM: + + * send(), recv() may not work, we can only use + read()/write(). + + * write(): either send the whole packet, or send nothing - * read(): read() will read the minimun of the - requested number of bytes and current packet size. - read() can read part of a packet, but it - will not read cross packet boundaris + * read(): read() will read the minimun of the + requested number of bytes and current packet size. + read() can read part of a packet, but it + will not read cross packet boundaris - There are two modes: non-discard and dicard. If a packets is - not read all its bytes, the remaining bytes will be - or not be discarded. + There are two modes: non-discard and dicard. If a packets is + not read all its bytes, the remaining bytes will be + or not be discarded. - This is indicated by if (*max_pkt_size) is positive - (non-discard) or negative (discard) + This is indicated by if (*max_pkt_size) is positive + (non-discard) or negative (discard) - BYTE_STREAM: reliable + BYTE_STREAM: reliable - * write(): might write only part of requested bytes - each time. (this is the case in SunOS4) + * write(): might write only part of requested bytes + each time. (this is the case in SunOS4) - * read(): might read less than requested bytes. - (this is the case in SunOS4). + * read(): might read less than requested bytes. + (this is the case in SunOS4). */ /* returns: -1 -- failed, 0 -- successful */ @@ -64,7 +64,7 @@ void ComCloseClient(void); "" -- UNIX socket, reliable byte stream [INET:]real_address -- INET sockets, reliable control byte stream, and *max_pkt_size == 0 : reliable data byte stream, or - != 0 : unreliable packet stream; + != 0 : unreliable packet stream; ATM:real_address -- ATM sockets, both data and control are unreliable packet streams; DATM:real_address -- INET/UNIX control reliable byte stream @@ -73,14 +73,14 @@ void ComCloseClient(void); returns: -1 -- failed, 0 -- successful *ctr_fd -- control connection file descriptor *data_fd -- data connection file descriptor - *max_pkt_size -- == 0 : reliable BYTE_STREAM - > 0 : unreliable non-discard PACKET STREAM - with given maximum packet size (bytes); - < 0 : unreliable discard PACKET STREAM - with given maximum packet size (bytes); + *max_pkt_size -- == 0 : reliable BYTE_STREAM + > 0 : unreliable non-discard PACKET STREAM + with given maximum packet size (bytes); + < 0 : unreliable discard PACKET STREAM + with given maximum packet size (bytes); It is suggested that if a BYTE_STREAM is not known to be discarded, - than it is safer to indicate it as discard. + than it is safer to indicate it as discard. */ int ComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size); int VideoComOpenConnPair(char * address, int *ctr_fd, int *data_fd, int *max_pkt_size); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h index 46432a71797..640037cbd5c 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/fileio.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -25,7 +25,7 @@ */ /* data structure used by StatFile() */ -#if !defined (_MPEG_FILE_IO_H) +#ifndef _MPEG_FILE_IO_H #define _MPEG_FILE_IO_H struct StatBuf diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h index 7befdfaa20d..673cf5a6804 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/filters.h @@ -1,31 +1,31 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen * Department of Computer Science and Engineering * email: scen@cse.ogi.edu */ -#define FILTER_LOWPASS 0 -#define FILTER_MEDIAN 1 -#define FILTER_AVERAGE 2 +#define FILTER_LOWPASS 0 +#define FILTER_MEDIAN 1 +#define FILTER_AVERAGE 2 typedef struct MedianFilter { int type; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h index 61a011217d9..fa55050458b 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/routine.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -24,7 +24,7 @@ * email: scen@cse.ogi.edu */ /* routine.c */ -#if !defined (_MPEG_ROUTINE_H) +#ifndef _MPEG_ROUTINE_H #define _MPEG_ROUTINE_H #include "include/common.h" diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h index f7d2adae6e0..60935fae8ed 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/mpeg_shared/sendpt.h @@ -1,22 +1,22 @@ /* $Id$ */ /* Copyright (c) 1995 Oregon Graduate Institute of Science and Technology * P.O.Box 91000-1000, Portland, OR 97291, USA; - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of O.G.I. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. O.G.I. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of O.G.I. not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. O.G.I. makes no representations about the + * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. - * - * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING - * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL - * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY - * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN - * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * + * O.G.I. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING + * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL + * O.G.I. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY + * DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN + * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * Author: Shanwei Cen @@ -31,5 +31,9 @@ */ #include "ace/OS.h" +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + void ComputeSendPattern(char * pat, char * buf, int len, int f); diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h index 79072ae4877..99c6079a419 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Machine_Properties.h @@ -9,7 +9,7 @@ // = DESCRIPTION // As a trading service dynamic property, retrieves machine // statistics from the rstatd using Sun RPC. -// +// // = AUTHORS // Seth Widoff <sbw1@cs.wustl.edu> // @@ -31,7 +31,7 @@ class TAO_Machine_Properties : { public: - enum PROP_TYPES + enum PROP_TYPES { CPU, DISK, @@ -47,11 +47,11 @@ public: static const int NUM_PROPERTIES; static const char* PROP_NAMES[]; - + TAO_Machine_Properties (void); - - TAO_Machine_Properties (const ACE_Time_Value& timeout); - + + TAO_Machine_Properties (const ACE_Time_Value& timeout); + virtual CORBA::Any* evalDP (const char* name, CORBA::TypeCode_ptr returned_type, const CORBA::Any& extra_info, @@ -66,11 +66,11 @@ public: virtual int define_properties (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, CORBA::ULong offset = 0) const; - + private: void init (void); - + int retrieve_stats (void); void compute_cpu (CORBA::Any& value, int elapsed_time); @@ -83,15 +83,15 @@ private: void compute_collisions (CORBA::Any& value, int elapsed_time); void compute_interrupts (CORBA::Any& value, int elapsed_time); void compute_load (CORBA::Any& value, int elapsed_time); - - const ACE_Time_Value timeout_; + + const ACE_Time_Value timeout_; ACE_Time_Value timestamp_; ACE_Time_Value sample_time_; - + statstime stats_; statstime old_stats_; CLIENT* rstat_client_; - + }; #endif /* TAO_MACHINE_PROPERTIES */ diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h index 3db368a5bb5..4c236f3e8bb 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Property_Exporter.h @@ -2,7 +2,7 @@ // ======================================================================== // $Id$ -// +// // = LIBRARY // TAO/orbsvcs/orbsvcs // @@ -12,13 +12,13 @@ // = DESCRIPTION // Allows a service to export properties to both a Property Set and // a Trading Service simulatenously. -// +// // = AUTHORS // Seth Widoff <sbw1@cs.wustl.edu> // // ======================================================================== -#if ! defined (TAO_PROPERTY_EXPORTER_H) +#ifndef TAO_PROPERTY_EXPORTER_H #define TAO_PROPERTY_EXPORTER_H #include "orbsvcs/CosTradingC.h" @@ -42,13 +42,13 @@ public: (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, CORBA::ULong offset = 0) const = 0; // Append property definitions to the service type defintition - // sequence. The <offset> is the point at which the method can begin + // sequence. The <offset> is the point at which the method can begin // placing the PropStructures. define_properties returns the number // of properties inserted from the offset. }; -class TAO_Property_Exporter +class TAO_Property_Exporter // = TITLE // Publish public properties of a servant to a // CosPropertyService::PropSet instance and a Trading Service @@ -62,82 +62,82 @@ class TAO_Property_Exporter public: TAO_Property_Exporter (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size = 10); - - + CosPropertyService::PropertySet_ptr prop_set, + CORBA::ULong initial_size = 10); + + ~TAO_Property_Exporter (void); // Delete all Dynamic Property adapters - + void add_static_property (const char* name, - const CORBA::Any& value); + const CORBA::Any& value); // Add a property to the Offer and the PropSet. - + void add_dynamic_property (const char* name, - const CORBA::Any& intial_value, - TAO_Dynamic_Property& dp); + const CORBA::Any& intial_value, + TAO_Dynamic_Property& dp); // Add a property to the PropSet and a dynamic property to the // Offer. Have the dynamic property connect to the PropSet accessor - // for that name. + // for that name. void add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp& dp_struct); + CosTradingDynamic::DynamicProp& dp_struct); void add_dynamic_property (const char* name, - CosTradingDynamic::DynamicProp* dp_struct); - + CosTradingDynamic::DynamicProp* dp_struct); + CosTrading::OfferId export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - CORBA::Environment& _env) + const CosTrading::ServiceTypeName type, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); + CosPropertyService::MultipleExceptions, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); // Export the offer to the trader under the given type. - + typedef CosTradingRepos::ServiceTypeRepository TRADING_REPOS; CosTrading::OfferId export (const CORBA::Object_ptr object_ref, - const CosTrading::ServiceTypeName type, - const TRADING_REPOS::PropStructSeq& props, - const TRADING_REPOS::ServiceTypeNameSeq& stypes, - CORBA::Environment& _env) + const CosTrading::ServiceTypeName type, + const TRADING_REPOS::PropStructSeq& props, + const TRADING_REPOS::ServiceTypeNameSeq& stypes, + CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::IllegalServiceType, - TRADING_REPOS::ServiceTypeExists, - TRADING_REPOS::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - TRADING_REPOS::ValueTypeRedefinition, - TRADING_REPOS::DuplicateServiceTypeName, - CosTrading::Register::InvalidObjectRef, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); + CosPropertyService::MultipleExceptions, + CosTrading::IllegalServiceType, + TRADING_REPOS::ServiceTypeExists, + TRADING_REPOS::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + TRADING_REPOS::ValueTypeRedefinition, + TRADING_REPOS::DuplicateServiceTypeName, + CosTrading::Register::InvalidObjectRef, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); // Export the offer to the trader under the given type. Register the // type with the current definition if the type can't be found in // the service type repository. - + private: - + TAO_Property_Exporter (const TAO_Property_Exporter&); void operator= (const TAO_Property_Exporter&); // These don't make sense on this class. const int increment_; - + CosTrading::Lookup_var lookup_; CosPropertyService::PropertySet_var prop_set_; - CORBA::ULong pcount_, tcount_; + CORBA::ULong pcount_, tcount_; CosTrading::PropertySeq tprops_; CosPropertyService::Properties pprops_; }; @@ -156,38 +156,38 @@ class TAO_Property_Modifier public: TAO_Property_Modifier (CosTrading::Lookup_var lookup_if, - CosPropertyService::PropertySet_ptr prop_set, - CORBA::ULong initial_size = 10); + CosPropertyService::PropertySet_ptr prop_set, + CORBA::ULong initial_size = 10); // If no Lookup Interface is provided to the constructor, then // resolve_initial_references ("TradingService") will be used. void delete_property (const char* name); // Remove a property from the current prop_set/offer. - + void modify_property (const char* name, const CORBA::Any& value); // Modify a property from the current prop_set/offer. - + void commit (CosTrading::OfferId id, CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosPropertyService::MultipleExceptions, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)); + CosPropertyService::MultipleExceptions, + CosTrading::NotImplemented, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId, + CosTrading::IllegalPropertyName, + CosTrading::Register::UnknownPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::Register::MandatoryProperty, + CosTrading::Register::ReadonlyProperty, + CosTrading::DuplicatePropertyName)); // Commit your changes to the trading service. private: const int increment_; - + int pdcount_; int pmcount_; @@ -196,13 +196,13 @@ public: CosTrading::Lookup_var lookup_; CosPropertyService::PropertySet_var prop_set_; - + CosPropertyService::PropertyNames pdelete_; CosPropertyService::Properties pmodify_; - + CosTrading::PropertyNameSeq tdelete_; CosTrading::PropertySeq tmodify_; - + TAO_Property_Modifier (const TAO_Property_Modifier&); void operator= (const TAO_Property_Modifier&); // These don't make sense on this class. diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h index 624635e7244..88dda6f6a5e 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/Video_Repository.h @@ -2,16 +2,16 @@ // ============================================================================ // $Id$ -// // -// = FILENAME +// +// = FILENAME // Video_Repository.h -// -// = DESCRIPTION +// +// = DESCRIPTION // As a trading service dynamic property, creates a sequence of // structures, each structure describing a movie in the video -// repository. -// +// repository. +// // = AUTHORS // Seth Widoff <sbw1@cs.wustl.edu> // @@ -20,9 +20,14 @@ #if (! defined TAO_VIDEO_REPOSITORY_H) #define TAO_VIDEO_REPOSITORY_H -#include "orbsvcs/Trader/Trader_Utils.h" +#include "orbsvcs/Trader/Trader_Utils.h" #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "Video_RepositoryC.h" #include "Property_Exporter.h" @@ -31,7 +36,7 @@ class TAO_Video_Repository : public TAO_Exportable // = DESCRIPTION // When evalDP is invoked by the Dynamic Property Dispatcher, the -// TAO_Video_Repository parses the database file and creates a Movie +// TAO_Video_Repository parses the database file and creates a Movie // Sequence, each structure of which describes a movie in the // database. The evalDP then crams the sequence into a dynamically // allocated Any, which it returns to the dispatcher. @@ -43,21 +48,21 @@ class TAO_Video_Repository : public: static const char* MOVIE_INFO; - + TAO_Video_Repository (const char* filename); // TAO_Video_Repository requires the pathname of the video // repository database. ~TAO_Video_Repository (void); - + virtual CORBA::Any* evalDP (const char* name, CORBA::TypeCode_ptr returned_type, const CORBA::Any& extra_info, - CORBA::Environment& _env) + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); virtual void export_properties (TAO_Property_Exporter& prop_exporter); - + virtual int define_properties (CosTradingRepos::ServiceTypeRepository::PropStructSeq& prop_seq, CORBA::ULong offet = 0) const; @@ -67,9 +72,9 @@ private: void parse_file (const char* database, int num_lines); static void obtain_movie_info (const char* file_name, - TAO_VR::Movie& movie) {} + TAO_VR::Movie& movie) {} // Extract the techincal information from the actual MPEG file. - + TAO_Video_Repository (void) {} TAO_Video_Repository& operator= (const TAO_Video_Repository& rep) { return *this; } diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h index bcaf6e8f20e..754917b3a75 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/as.h @@ -4,7 +4,7 @@ // // = LIBRARY // as -// +// // = FILENAME // as.h // @@ -14,13 +14,18 @@ // = AUTHORS // Sumedh Mungee (sumedh@cs.wustl.edu) // Nagarajan Surendran (naga@cs.wustl.edu) -// +// // ============================================================================ -#if !defined (TAO_AV_AS_H) +#ifndef TAO_AV_AS_H #define TAO_AV_AS_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" @@ -28,25 +33,25 @@ #include "ace/SOCK_CODgram.h" #include "ace/Select_Reactor.h" -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" +#include "include/common.h" +#include "mpeg_server/server_proto.h" +#include "mpeg_shared/fileio.h" +#include "mpeg_shared/routine.h" +#include "mpeg_shared/com.h" #include "mpeg_server/Audio_Control_i.h" #include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" #include "mpeg_server/Audio_Server.h" #include "orbsvcs/AV/AVStreams_i.h" -class Audio_Child_Process +class Audio_Child_Process :public TAO_AV_Child_Process_B <Audio_Server_StreamEndPoint,TAO_VDev,Audio_Control_i> { public: int init (int argc, char **argv); // init the Video Singleton. - + int make_mediactrl (Audio_Control_i *&media_ctrl); }; diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h index c7823f966ed..7083b7cdedd 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/augmented_server.h @@ -5,7 +5,7 @@ // // = LIBRARY // server -// +// // = FILENAME // server.h // @@ -15,13 +15,18 @@ // = AUTHORS // Sumedh Mungee (sumedh@cs.wustl.edu) // Nagarajan Surendran (naga@cs.wustl.edu) -// +// // ============================================================================ -#if !defined (TAO_AV_SERVER_H) +#ifndef TAO_AV_SERVER_H #define TAO_AV_SERVER_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" @@ -29,11 +34,11 @@ #include "ace/SOCK_CODgram.h" #include "ace/Select_Reactor.h" -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" +#include "include/common.h" +#include "mpeg_server/server_proto.h" +#include "mpeg_shared/fileio.h" +#include "mpeg_shared/routine.h" +#include "mpeg_shared/com.h" #include "mpeg_server/Video_Control_i.h" #include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" @@ -53,25 +58,25 @@ class AV_Audio_MMDevice : public TAO_MMDevice, - public TAO_Exportable + public TAO_Exportable { public: static const char* NUMBER_OF_CONNECTIONS; static const char* MAX_CONNECTIONS; static const char* SERVER_NAME; - + AV_Audio_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy); // Default constructor virtual AVStreams::StreamEndPoint_B_ptr - create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, - CORBA::Environment &env); + create_B (AVStreams::StreamCtrl_ptr the_requester, + AVStreams::VDev_out the_vdev, + AVStreams::streamQoS &the_qos, + CORBA::Boolean_out met_qos, + char *&named_vdev, + const AVStreams::flowSpec &the_spec, + CORBA::Environment &env); // Called by StreamCtrl to create a "B" type streamandpoint and vdev CORBA::ULong connections (void) const; @@ -84,7 +89,7 @@ public: CORBA::ULong offset = 0) const; private: - + CORBA::ULong connections_; // Number of active connections @@ -93,7 +98,7 @@ private: class AV_Server; -class AV_Server_Sig_Handler +class AV_Server_Sig_Handler : public virtual ACE_Event_Handler { public: @@ -105,7 +110,7 @@ public: // this will register this sig_handler // with the reactor for SIGCHLD,SIGTERM,SIGINT - virtual int shutdown (ACE_HANDLE, + virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); virtual int handle_input (ACE_HANDLE); @@ -131,7 +136,7 @@ public: private: const AV_Server& av_server_; - + ACE_HANDLE handle_; // dummy handle for the sig handler. ACE_Sig_Set sig_set; @@ -140,7 +145,7 @@ private: class AV_Server { // = TITLE - // Defines a class that abstracts the functionality of a + // Defines a class that abstracts the functionality of a // video and audio server. // // = DESCRIPTION @@ -149,7 +154,7 @@ class AV_Server public: static const char* SERVICE_TYPE; - + AV_Server (void); // constructor @@ -162,10 +167,10 @@ public: // Run the AV_Server void shutdown (void) const; - + static void on_exit_routine (void); - // Routine called when this process exits. - + // Routine called when this process exits. + static pid_t current_pid_; // %% the pid the server is currently waiting on @@ -183,7 +188,7 @@ private: void export_properties (CORBA::Environment& _env); int resolve_trader (CORBA::Environment& _env); - + TAO_ORB_Manager orb_manager_; // the TAO ORB manager. @@ -193,16 +198,16 @@ private: TAO_Video_Repository video_rep_; // Dynamic property that assesses the contents of the sever's video // repository. - + CosTrading::Lookup_var trader_; // Reference to the Lookup interface of the trading service. - + CosTrading::OfferId_var offer_id_; // Server offer id. CosTradingRepos::ServiceTypeRepository::PropStructSeq prop_seq_; // Service type definition. - + CosNaming::NamingContext_var naming_context_; // The root naming context of the naming service diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h index 4d34e1fdfda..e263670efaa 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/server.h @@ -5,7 +5,7 @@ // // = LIBRARY // server -// +// // = FILENAME // server.h // @@ -15,13 +15,18 @@ // = AUTHORS // Sumedh Mungee (sumedh@cs.wustl.edu) // Nagarajan Surendran (naga@cs.wustl.edu) -// +// // ============================================================================ -#if !defined (TAO_AV_SERVER_H) +#ifndef TAO_AV_SERVER_H #define TAO_AV_SERVER_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" @@ -29,11 +34,11 @@ #include "ace/SOCK_CODgram.h" #include "ace/Select_Reactor.h" -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" +#include "include/common.h" +#include "mpeg_server/server_proto.h" +#include "mpeg_shared/fileio.h" +#include "mpeg_shared/routine.h" +#include "mpeg_shared/com.h" #include "mpeg_server/Video_Control_i.h" #include "orbsvcs/Naming/Naming_Utils.h" @@ -54,12 +59,12 @@ public: Audio_MMDevice (TAO_AV_Endpoint_Process_Strategy *endpoint_strategy_); // Default constructor - virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester, - AVStreams::VDev_out the_vdev, - AVStreams::streamQoS &the_qos, - CORBA::Boolean_out met_qos, - char *&named_vdev, - const AVStreams::flowSpec &the_spec, + virtual AVStreams::StreamEndPoint_B_ptr create_B (AVStreams::StreamCtrl_ptr the_requester, + AVStreams::VDev_out the_vdev, + AVStreams::streamQoS &the_qos, + CORBA::Boolean_out met_qos, + char *&named_vdev, + const AVStreams::flowSpec &the_spec, CORBA::Environment &env); // Called by StreamCtrl to create a "B" type streamandpoint and vdev @@ -69,7 +74,7 @@ private: // Number of active connections }; -class AV_Server_Sig_Handler +class AV_Server_Sig_Handler : public virtual ACE_Event_Handler { public: @@ -81,7 +86,7 @@ public: // this will register this sig_handler // with the reactor for SIGCHLD,SIGTERM,SIGINT - virtual int shutdown (ACE_HANDLE, + virtual int shutdown (ACE_HANDLE, ACE_Reactor_Mask); virtual int handle_input (ACE_HANDLE); @@ -111,14 +116,14 @@ private: ACE_Sig_Set sig_set; TAO_Naming_Client my_name_client_; - // Name_Client used for unregistering the audio and video - + // Name_Client used for unregistering the audio and video + }; class AV_Server { // = TITLE - // Defines a class that abstracts the functionality of a + // Defines a class that abstracts the functionality of a // video and audio server. // // = DESCRIPTION diff --git a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h index 21060b26626..a8dc2a63f55 100644 --- a/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h +++ b/TAO/orbsvcs/tests/AVStreams/mpeg/source/server/vs.h @@ -5,7 +5,7 @@ // // = LIBRARY // vs -// +// // = FILENAME // vs.h // @@ -15,13 +15,18 @@ // = AUTHORS // Sumedh Mungee (sumedh@cs.wustl.edu) // Nagarajan Surendran (naga@cs.wustl.edu) -// +// // ============================================================================ -#if !defined (TAO_AV_VS_H) +#ifndef TAO_AV_VS_H #define TAO_AV_VS_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Acceptor.h" #include "ace/Svc_Handler.h" #include "ace/SOCK_Acceptor.h" @@ -29,25 +34,25 @@ #include "ace/SOCK_CODgram.h" #include "ace/Select_Reactor.h" -#include "include/common.h" -#include "mpeg_server/server_proto.h" -#include "mpeg_shared/fileio.h" -#include "mpeg_shared/routine.h" -#include "mpeg_shared/com.h" +#include "include/common.h" +#include "mpeg_server/server_proto.h" +#include "mpeg_shared/fileio.h" +#include "mpeg_shared/routine.h" +#include "mpeg_shared/com.h" #include "mpeg_server/Video_Control_i.h" #include "orbsvcs/orbsvcs/Naming/Naming_Utils.h" #include "mpeg_server/Video_Server.h" #include "orbsvcs/AV/AVStreams_i.h" -class Video_Child_Process +class Video_Child_Process :public TAO_AV_Child_Process_B <Video_Server_StreamEndPoint,TAO_VDev,Video_Control_i> { public: int init (int argc, char **argv); // init the Video Singleton. - + int make_mediactrl (Video_Control_i *&media_ctrl); }; diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h index 94efd7c114d..eaa10aa2770 100644 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h +++ b/TAO/orbsvcs/tests/AVStreams/server_discovery/Server_0005fDiscovery_0005fUtil.h @@ -1,6 +1,6 @@ // ======================================================================== // $Id$ -// +// // = FILENAME // Server_0005fDiscovery_0005fUtil.h // diff --git a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h index 6bc3449b640..37c9fb15301 100644 --- a/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h +++ b/TAO/orbsvcs/tests/AVStreams/server_discovery/Trader_Client.h @@ -1,6 +1,6 @@ // ======================================================================== // $Id$ -// +// // = FILENAME // Trader_Client.h // @@ -32,23 +32,23 @@ public: int num_movies (void) const { return this->movie_info_.length (); } - + const char* name (void) const { return this->movie_info_[this->index_].name_.in (); } const char* description (void) const { return this->movie_info_[this->index_].description_.in (); } - + const char* filename (void) const { return this->movie_info_[this->index_].filename_.in (); } - + const char* category (void) const { return this->movie_info_[this->index_].category_.in (); } private: - + int index_; - + TAO_VR::Movie_Info movie_info_; }; @@ -61,7 +61,7 @@ public: ~Trader_Client (void); // Destory all that was dynamically allocated. - + void init (int argc, char** argv); // Call once, prior to query_trader. @@ -71,22 +71,22 @@ public: void load_movie (const char* server_name, const char* movie_name); // Instruct the A/V client to begin an A/V stream with the // designated host. - + void get_servers (int& length, char**& server_names); // Return the list of server names whose offers were obtained from // the Trader. - + Movie_Iterator* get_movie_info (const char* server_name); // Fill in the sequence with movie information for all movies // offered by the specified server. - + float evaluate_performance_property (const char* server_name, const char* property_name); // Evaluate the specified property with respect to the offer from // the specified server. static Trader_Client* instance (void); - + protected: Trader_Client (void); @@ -96,16 +96,16 @@ protected: private: static Trader_Client* instance_; - + void create_hash_table_entry (CosTrading::Offer& offer); TAO_VR::Movie_Info* fetch_movie_array (const char* server_name); - + typedef ACE_Hash_Map_Manager <TAO_String_Hash_Key, CosTrading::Property, ACE_Null_Mutex> Property_Map; - // Second-tier map --- maps property names to their values. - + // Second-tier map --- maps property names to their values. + typedef ACE_Hash_Map_Manager <TAO_String_Hash_Key, Property_Map*, ACE_Null_Mutex> Server_Map; @@ -113,10 +113,10 @@ private: TAO_ORB_Manager orb_manager_; // Standard orb stuff. - + CosTrading::Lookup_var lookup_; // A reference to the trader, what else? - + Server_Map map_; // The two-tiered map of server names to a map of property names to // values. diff --git a/TAO/orbsvcs/tests/Concurrency/CC_client.h b/TAO/orbsvcs/tests/Concurrency/CC_client.h index 089b01c88ec..73d15f8326a 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_client.h +++ b/TAO/orbsvcs/tests/Concurrency/CC_client.h @@ -19,6 +19,11 @@ // ============================================================================ #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/corba.h" #include "orbsvcs/CosConcurrencyControlC.h" #include "orbsvcs/CosNamingC.h" @@ -27,7 +32,7 @@ #include "CC_command.h" #include "CC_command.tab.h" -#if !defined(_CC_CLIENT_H_) +#ifndef _CC_CLIENT_H_ #define _CC_CLIENT_H_ // Stuff to be used by the command file parser diff --git a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h b/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h index 9c4e4f84bfb..4f247f92c51 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h +++ b/TAO/orbsvcs/tests/Concurrency/CC_naming_service.h @@ -23,7 +23,7 @@ #include "orbsvcs/CosNamingC.h" #include "orbsvcs/Naming/Naming_Utils.h" -#if !defined (_CC_NAMING_SERVICE_H_) +#ifndef _CC_NAMING_SERVICE_H_ #define _CC_NAMING_SERVICE_H_ class CC_naming_service @@ -77,7 +77,7 @@ private: TAO_Naming_Client my_name_client_; // Name service wrapper class - + CosConcurrencyControl::LockSetFactory_var factory_; // factory pointer for the lock set. diff --git a/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h b/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h index b5bfaa549b9..4c1a643f863 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h +++ b/TAO/orbsvcs/tests/Concurrency/CC_test_utils.h @@ -13,7 +13,7 @@ // concurrency service test. // // = AUTHORS -// Torben Worm <tworm@cs.wustl.edu> +// Torben Worm <tworm@cs.wustl.edu> // // ============================================================================ diff --git a/TAO/orbsvcs/tests/Concurrency/CC_tests.h b/TAO/orbsvcs/tests/Concurrency/CC_tests.h index 3d9bca5b57e..086ea0766b1 100644 --- a/TAO/orbsvcs/tests/Concurrency/CC_tests.h +++ b/TAO/orbsvcs/tests/Concurrency/CC_tests.h @@ -23,7 +23,7 @@ #include "orbsvcs/CosNamingC.h" #include "CC_naming_service.h" -#if !defined (_CC_TESTS_H_) +#ifndef _CC_TESTS_H_ #define _CC_TESTS_H_ // Return codes for the tests diff --git a/TAO/orbsvcs/tests/Concurrency/NS_client.h b/TAO/orbsvcs/tests/Concurrency/NS_client.h index 427f3d82547..6c6407511e8 100644 --- a/TAO/orbsvcs/tests/Concurrency/NS_client.h +++ b/TAO/orbsvcs/tests/Concurrency/NS_client.h @@ -11,19 +11,24 @@ // // = DESCRIPTION // This class tests the facilities to connect to the naming -// service and to resolve the name for the concurrency service client. +// service and to resolve the name for the concurrency service client. // // = AUTHORS // Sergio Flores-Gaitan <sergio@cs.wustl.edu> -// Torben Worm <tworm@cs.wustl.edu> +// Torben Worm <tworm@cs.wustl.edu> // // ============================================================================ #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/corba.h" #include "orbsvcs/orbsvcs/CosNamingC.h" -class CosNaming_Client +class CosNaming_Client { // = TITLE // Defines a class that encapsulates behaviour of the CosNaming @@ -64,7 +69,7 @@ private: TAO_Naming_Client my_name_client_; // And our Naming Client! - + int list_contents_; // Iterate through the naming service and list the contents. diff --git a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h index 271ebd86f03..5ffa770d18e 100644 --- a/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h +++ b/TAO/orbsvcs/tests/EC_Basic/EC_Basic.h @@ -14,10 +14,15 @@ // // ============================================================================ -#if !defined (EC_BASIC_H) +#ifndef EC_BASIC_H #define EC_BASIC_H #include "ace/SString.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/High_Res_Timer.h" #include "orbsvcs/RtecEventChannelAdminC.h" #include "orbsvcs/RtecEventCommS.h" @@ -120,7 +125,7 @@ public: virtual void push (const RtecEventComm::EventSet& events, CORBA::Environment &_env); virtual void disconnect_push_consumer (CORBA::Environment &); - + private: ECB_Test* test_; // To callback. @@ -178,7 +183,7 @@ private: // To callback. int supplier_id_; - // This is NOT the supplier ID for the EC, just a number for the + // This is NOT the supplier ID for the EC, just a number for the RtecScheduler::handle_t rt_info_; // The handle for our RT_Info description. @@ -248,7 +253,7 @@ public: CORBA::Environment &_env); // The callback from the Consumer.... - + private: ECB_Consumer consumer0_; ECB_Consumer consumer1_; @@ -321,7 +326,7 @@ public: const RtecEventComm::EventSet& events, CORBA::Environment &_env); // The callback from the Consumer.... - + private: ECB_Consumer consumer_; // The consumer... diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h index d3b7aa9a7fa..30cdaa86d40 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Consumer.h @@ -8,10 +8,15 @@ // // ============================================================================ -#if !defined (ECM_CONSUMER_H) +#ifndef ECM_CONSUMER_H #define ECM_CONSUMER_H #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/Channel_Clients_T.h" class Driver; @@ -27,17 +32,17 @@ public: Test_Consumer (Driver* driver, void* cookie); void connect (const char* name, - int event_a, - int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + int event_a, + int event_b, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); // This method connects the consumer to the EC. void disconnect (CORBA::Environment &_env); // Disconnect from the EC. virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); + CORBA::Environment &_env); virtual void disconnect_push_consumer (CORBA::Environment &); // The skeleton methods. @@ -48,7 +53,7 @@ private: void* cookie_; // A magic cookie passed by the driver that we pass back in our // callbacks. - + RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; // We talk to the EC using this proxy. }; @@ -72,9 +77,9 @@ public: // Execute the test. void push_consumer (void* consumer_cookie, - ACE_hrtime_t arrival, - const RtecEventComm::EventSet& events, - CORBA::Environment&); + ACE_hrtime_t arrival, + const RtecEventComm::EventSet& events, + CORBA::Environment&); // Callback method for consumers, if any of our consumers has // received events it will invoke this method. @@ -83,7 +88,7 @@ private: // parse the command line args void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_consumers (CORBA::Environment &_env); // Connect and disconnect the consumers. diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h index aaea0c22fa4..b690100fbce 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Data.h @@ -9,10 +9,15 @@ // // ============================================================================ -#if !defined (ECM_DATA_H) +#ifndef ECM_DATA_H #define ECM_DATA_H #include "ace/Map_Manager.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "dataC.h" struct ECM_Data diff --git a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h index 810af9d5cd6..e9e6c6459e6 100644 --- a/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Custom_Marshal/ECM_Supplier.h @@ -8,10 +8,15 @@ // // ============================================================================ -#if !defined (ECM_SUPPLIER_H) +#ifndef ECM_SUPPLIER_H #define ECM_SUPPLIER_H #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/Channel_Clients_T.h" class ECMS_Driver; @@ -32,11 +37,11 @@ public: // Run the test, just forwards to the driver void connect (const char* name, - int event_a, - int event_b, - int event_period, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + int event_a, + int event_b, + int event_period, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); // This method connects the supplier to the EC. void disconnect (CORBA::Environment &_env); @@ -48,7 +53,7 @@ public: RtecEventComm::EventSourceID supplier_id (void) const; // The supplier ID. - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer_proxy (void); + RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer_proxy (void); // We talk to the EC (as a supplier) using this proxy, no duplicates // are done here... @@ -62,7 +67,7 @@ private: RtecEventComm::EventSourceID supplier_id_; // We generate an id based on the name.... - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; + RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; // We talk to the EC (as a supplier) using this proxy. ACE_PushSupplier_Adapter<Test_Supplier> supplier_; @@ -89,13 +94,13 @@ public: // Execute the test. int supplier_task (Test_Supplier *supplier, - void *supplier_cookie); + void *supplier_cookie); // This method is run by the supplier task. void push_supplier (void* supplier_cookie, - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, - const RtecEventComm::EventSet &events, - CORBA::Environment &); + RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, + const RtecEventComm::EventSet &events, + CORBA::Environment &); // Callback method for suppliers, we push for them to their // consumers and take statistics on the way. // It is possible that we ignore the <consumer> parameter when @@ -106,7 +111,7 @@ private: // parse the command line args void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_suppliers (CORBA::Environment &_env); // Connect the suppliers. diff --git a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h index 386aef0435d..d4df57d892d 100644 --- a/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h +++ b/TAO/orbsvcs/tests/EC_Mcast/EC_Mcast.h @@ -41,10 +41,15 @@ // // ============================================================================ -#if !defined (EC_MCAST_H) +#ifndef EC_MCAST_H #define EC_MCAST_H #include "ace/SString.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/High_Res_Timer.h" #include "orbsvcs/RtecEventChannelAdminC.h" #include "orbsvcs/RtecEventCommS.h" @@ -69,11 +74,11 @@ class ECM_Federation // public: ECM_Federation (char* name, - CORBA::UShort mcast_port, - int supplier_types, - char** supplier_names, - int consumer_types, - char** consumer_names); + CORBA::UShort mcast_port, + int supplier_types, + char** supplier_names, + int consumer_types, + char** consumer_names); // Constructor, it assumes ownership of the buffers, strings must be // allocated using CORBA::string_alloc(), buffers using operator new. @@ -105,9 +110,9 @@ public: // The ipaddr (in host byte order) of the event type <i> void open (ACE_SOCK_Dgram *dgram, - RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &_env); + RtecEventChannelAdmin::EventChannel_ptr ec, + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment &_env); // Connect the UDP sender to the EC. void close (CORBA::Environment &_env); @@ -159,27 +164,27 @@ public: ECM_Supplier (ECM_Local_Federation* federation); void open (const char* name, - RtecScheduler::Period period, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); + RtecScheduler::Period period, + RtecEventChannelAdmin::EventChannel_ptr event_channel, + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment& _env); // This method connects the supplier to the EC. void close (CORBA::Environment &_env); // Disconnect from the EC. void activate (const char* name, - RtecScheduler::Period period, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); + RtecScheduler::Period period, + RtecEventChannelAdmin::EventChannel_ptr event_channel, + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment& _env); // Connect as a consumer to start receiving events. RtecEventComm::EventSourceID supplier_id (void) const; // The supplier ID. void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_push_consumer (CORBA::Environment &); // Implement the callbacks for our consumer personality. @@ -193,14 +198,14 @@ private: RtecEventComm::EventSourceID supplier_id_; // We generate an id based on the name.... - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; + RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; // We talk to the EC (as a supplier) using this proxy. ACE_PushConsumer_Adapter<ECM_Supplier> consumer_; // We also connect to the EC as a consumer so we can receive the // timeout events. - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; + RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; // We talk to the EC (as a supplier) using this proxy. }; @@ -218,24 +223,24 @@ public: ECM_Consumer (ECM_Local_Federation* federation); void open (const char* name, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - ACE_RANDR_TYPE &seed, - CORBA::Environment& _env); + RtecEventChannelAdmin::EventChannel_ptr event_channel, + RtecScheduler::Scheduler_ptr scheduler, + ACE_RANDR_TYPE &seed, + CORBA::Environment& _env); // This method connects the consumer to the EC. void close (CORBA::Environment &_env); // Disconnect from the EC. void connect (ACE_RANDR_TYPE& seed, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect (CORBA::Environment &_env); // Disconnect from the supplier, but do not forget about it or close // it. // = The POA_RtecEventComm::PushComsumer methods. virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); + CORBA::Environment &_env); virtual void disconnect_push_consumer (CORBA::Environment &); private: @@ -257,45 +262,45 @@ class ECM_Local_Federation // = DESCRIPTION // This class is used to represent a federation that is actually // running in this process. - // + // public: ECM_Local_Federation (ECM_Federation *federation, - ECM_Driver *driver); + ECM_Driver *driver); // Constructor. ~ECM_Local_Federation (void); // Destructor void open (int event_count, - RtecScheduler::Period period, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); + RtecScheduler::Period period, + RtecEventChannelAdmin::EventChannel_ptr event_channel, + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment& _env); // Connect both the supplier and the consumer. void close (CORBA::Environment& _env); // Disconnect everybody from the EC void activate (RtecScheduler::Period period, - RtecEventChannelAdmin::EventChannel_ptr event_channel, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment& _env); + RtecEventChannelAdmin::EventChannel_ptr event_channel, + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment& _env); // Activate the supplier void supplier_timeout (RtecEventComm::PushConsumer_ptr consumer, - CORBA::Environment& _env); + CORBA::Environment& _env); // The supplier is ready to send a new event. void consumer_push (ACE_hrtime_t arrival, - const RtecEventComm::EventSet& event, - CORBA::Environment& _env); + const RtecEventComm::EventSet& event, + CORBA::Environment& _env); // The consumer just received an event. const ECM_Federation *federation (void) const; // The federation description. void open_receiver (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &_env); + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment &_env); // Connect the UDP receiver to the EC. void close_receiver (CORBA::Environment &_env); @@ -418,20 +423,20 @@ public: // Run the test, read all the configuration files, etc. void federation_has_shutdown (ECM_Local_Federation *federation, - CORBA::Environment& _env); + CORBA::Environment& _env); // One of the federations has completed its simulation, once all of // them finish the test exists. - + private: void open_federations (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &_env); + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment &_env); // Connect the federations to the EC. void activate_federations (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &_env); + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment &_env); // Activate all the federations void close_federations (CORBA::Environment &_env); @@ -439,13 +444,13 @@ private: // the objects, etc. void open_senders (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &_env); + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment &_env); // Connect all the senders, so we can start multicasting events. void open_receivers (RtecEventChannelAdmin::EventChannel_ptr ec, - RtecScheduler::Scheduler_ptr scheduler, - CORBA::Environment &_env); + RtecScheduler::Scheduler_ptr scheduler, + CORBA::Environment &_env); // Connect all the receivers, thus we accept events arriving through // multicast. @@ -465,16 +470,16 @@ private: // parse the command line arguments int parse_name_list (FILE* file, int n, char** names, - const char* error_msg); + const char* error_msg); // parse one of the lists of names in the federation definition. int skip_blanks (FILE* file, - const char* error_msg); + const char* error_msg); // skip the blanks in the file. void dump_results (void); // Dump the results to the standard output. - + private: int event_period_; // The events are generated using this interval. @@ -501,7 +506,7 @@ private: int all_federations_count_; // The total number of federations we belong to. - ECM_Federation* all_federations_[MAX_FEDERATIONS]; + ECM_Federation* all_federations_[MAX_FEDERATIONS]; // All the federations. ACE_Atomic_Op<ACE_SYNCH_MUTEX,int> federations_running_; diff --git a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h index 13cc5a5a4ed..0cf9985583c 100644 --- a/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h +++ b/TAO/orbsvcs/tests/EC_Multiple/EC_Multiple.h @@ -12,10 +12,15 @@ // // ============================================================================ -#if !defined (EC_MULTIPLE_H) +#ifndef EC_MULTIPLE_H #define EC_MULTIPLE_H #include "ace/SString.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/High_Res_Timer.h" #include "orbsvcs/RtecEventChannelAdminC.h" #include "orbsvcs/RtecEventCommS.h" @@ -40,23 +45,23 @@ public: Test_Supplier (Test_ECG* test, void* cookie); void open (const char* name, - int event_a, int event_b, - int message_count, - const RtecScheduler::Period& rate, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + int event_a, int event_b, + int message_count, + const RtecScheduler::Period& rate, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); // This method connects the supplier to the EC. void close (CORBA::Environment &_env); // Disconnect from the EC. void activate (const char* name, - const RtecScheduler::Period& rate, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + const RtecScheduler::Period& rate, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_push_consumer (CORBA::Environment &); // Implement the callbacks for our consumer personality. @@ -83,14 +88,14 @@ private: int message_count_; // The number of events sent by this supplier. - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; + RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; // We talk to the EC (as a supplier) using this proxy. ACE_PushConsumer_Adapter<Test_Supplier> consumer_; // We also connect to the EC as a consumer so we can receive the // timeout events. - RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; + RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; // We talk to the EC (as a supplier) using this proxy. }; @@ -111,16 +116,16 @@ public: Test_Consumer (Test_ECG* test, void *cookie); void open (const char* name, - int event_a, int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + int event_a, int event_b, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); // This method connects the consumer to the EC. void close (CORBA::Environment &_env); // Disconnect from the EC. virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); + CORBA::Environment &_env); virtual void disconnect_push_consumer (CORBA::Environment &); // The skeleton methods. @@ -174,51 +179,51 @@ public: // Execute the test. void push_supplier (void* supplier_cookie, - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, - const RtecEventComm::EventSet &events, - CORBA::Environment &); + RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer, + const RtecEventComm::EventSet &events, + CORBA::Environment &); // Callback method for suppliers, we push for them to their // consumers and take statistics on the way. // It is possible that we ignore the <consumer> parameter when // testing the short-circuit case. void push_consumer (void* consumer_cookie, - ACE_hrtime_t arrival, - const RtecEventComm::EventSet& events, - CORBA::Environment&); + ACE_hrtime_t arrival, + const RtecEventComm::EventSet& events, + CORBA::Environment&); // Callback method for consumers, if any of our consumers has // received events it will invoke this method. void shutdown_supplier (void* supplier_cookie, - RtecEventComm::PushConsumer_ptr consumer, - CORBA::Environment& _env); + RtecEventComm::PushConsumer_ptr consumer, + CORBA::Environment& _env); // One of the suppliers has completed its work. - + private: RtecEventChannelAdmin::EventChannel_ptr get_ec (CosNaming::NamingContext_ptr naming_context, - const char* ec_name, - CORBA::Environment &_env); + const char* ec_name, + CORBA::Environment &_env); // Helper routine to obtain an EC given its name. void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_suppliers (CORBA::Environment &_env); // Connect the suppliers. void activate_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); // Activate the suppliers, i.e. they start generating events. void connect_ecg (RtecEventChannelAdmin::EventChannel_ptr local_ec, - RtecEventChannelAdmin::EventChannel_ptr remote_ec, - RtecScheduler::Scheduler_ptr remote_sch, - CORBA::Environment &_env); + RtecEventChannelAdmin::EventChannel_ptr remote_ec, + RtecScheduler::Scheduler_ptr remote_sch, + CORBA::Environment &_env); // Connect the EC gateway, it builds the Subscriptions and the // Publications list. void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_consumers (CORBA::Environment &_env); // Connect and disconnect the consumers. @@ -244,7 +249,7 @@ private: void shutdown_consumer (int id); // One of the consumers has completed its work. - + private: char* lcl_name_; // The name of the "local" EC. @@ -316,7 +321,7 @@ private: int lp_workload_; // The number of iterations of ACE::is_prime() to execute in low - // priority consumers. + // priority consumers. int lp_interval_; // The low priority events are generated using this interval. diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h index 04e0cc23617..7e9b3537519 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Consumer.h @@ -10,10 +10,15 @@ // // ============================================================================ -#if !defined (ECT_CONSUMER_H) +#ifndef ECT_CONSUMER_H #define ECT_CONSUMER_H #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/High_Res_Timer.h" #include "orbsvcs/Channel_Clients_T.h" @@ -31,10 +36,10 @@ public: int n_suppliers); void connect (const char* name, - int event_a, - int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + int event_a, + int event_b, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); // This method connects the consumer to the EC. void disconnect (CORBA::Environment &_env); @@ -44,7 +49,7 @@ public: // Print out the results virtual void push (const RtecEventComm::EventSet& events, - CORBA::Environment &_env); + CORBA::Environment &_env); virtual void disconnect_push_consumer (CORBA::Environment &); // The skeleton methods. @@ -59,7 +64,7 @@ private: int n_suppliers_; // The number of suppliers that are feeding this consumer, we // terminate once we receive a shutdown event from each supplier. - + RtecEventChannelAdmin::ProxyPushSupplier_var supplier_proxy_; // We talk to the EC using this proxy. @@ -101,7 +106,7 @@ private: // parse the command line args void connect_consumers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_consumers (CORBA::Environment &_env); // Connect and disconnect the consumers. diff --git a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h index 5addf209973..59cbb8fdcdf 100644 --- a/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h +++ b/TAO/orbsvcs/tests/EC_Throughput/ECT_Supplier.h @@ -10,10 +10,15 @@ // // ============================================================================ -#if !defined (ECT_SUPPLIER_H) +#ifndef ECT_SUPPLIER_H #define ECT_SUPPLIER_H #include "ace/Task.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/High_Res_Timer.h" #include "orbsvcs/Channel_Clients_T.h" @@ -38,11 +43,11 @@ public: int burst_count, int burst_size, int event_size, - int burst_pause, - int event_a, - int event_b, - RtecEventChannelAdmin::EventChannel_ptr ec, - CORBA::Environment& _env); + int burst_pause, + int event_a, + int event_b, + RtecEventChannelAdmin::EventChannel_ptr ec, + CORBA::Environment& _env); // This method connects the supplier to the EC. void disconnect (CORBA::Environment &_env); @@ -54,7 +59,7 @@ public: RtecEventComm::EventSourceID supplier_id (void) const; // The supplier ID. - RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer_proxy (void); + RtecEventChannelAdmin::ProxyPushConsumer_ptr consumer_proxy (void); // We talk to the EC (as a supplier) using this proxy, no duplicates // are done here... @@ -71,7 +76,7 @@ private: RtecEventComm::EventSourceID supplier_id_; // We generate an id based on the name.... - RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; + RtecEventChannelAdmin::ProxyPushConsumer_var consumer_proxy_; // We talk to the EC (as a supplier) using this proxy. ACE_PushSupplier_Adapter<Test_Supplier> supplier_; @@ -113,7 +118,7 @@ private: // parse the command line args void connect_suppliers (RtecEventChannelAdmin::EventChannel_ptr local_ec, - CORBA::Environment &_env); + CORBA::Environment &_env); void disconnect_suppliers (CORBA::Environment &_env); // Connect the suppliers. @@ -134,7 +139,7 @@ private: // How many bursts we will send from each supplier. int burst_size_; - // The number of events + // The number of events int event_size_; // The size of the payload on each event. diff --git a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h index 7a36e8f216d..2ef454cc317 100644 --- a/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h +++ b/TAO/orbsvcs/tests/Event_Latency/Event_Latency.h @@ -5,7 +5,7 @@ // // = LIBRARY // ACE Event Service Benchmarks -// +// // = FILENAME // Latency.h // @@ -17,10 +17,15 @@ // // ============================================================================ -#if !defined (EVENT_LATENCY_H) +#ifndef EVENT_LATENCY_H #define EVENT_LATENCY_H #include "ace/SString.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/RtecEventChannelAdminC.h" #include "orbsvcs/RtecEventCommS.h" @@ -38,7 +43,7 @@ public: // a "null" push routine, for measuring aggregate timing. int open_consumer (RtecEventChannelAdmin::EventChannel_ptr ec, - const char *my_name); + const char *my_name); // Uses the name server to obtain a reference to the <supplier_name> // and registers with channel to receive notifications from the // supplier. Also registers to receive shutdown messages from the @@ -56,7 +61,7 @@ public: // (not protected to allow short-circuiting) protected: virtual void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); + CORBA::Environment &); // If the <events>[0] is a notification, prints out the data from // the supplier. If its a shutdown message, the consumer // disconnects from the channel. @@ -133,7 +138,7 @@ public: class Consumer : public POA_RtecEventComm::PushConsumer { public: virtual void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); + CORBA::Environment &); // The channel pushed some events to us. virtual void disconnect_push_consumer (CORBA::Environment &); @@ -148,14 +153,14 @@ public: }; Latency_Supplier (const u_int total_messages, - CORBA::Long supplier_id, + CORBA::Long supplier_id, const int timestamp = 0); // Construction. Requires the total number of messages to be // sent. If the timestamp flag is enabled, then events are // timestamped, e.g., for use in measuring jitter. int open_supplier (RtecEventChannelAdmin::EventChannel_ptr event_channel, - const char *name, int master); + const char *name, int master); // Registers with the name server under the given <name>. Also // connects to the Event Channel as a supplier of notifications and // shutdown messages. If <master> != 0, then the supplier will @@ -169,7 +174,7 @@ public: // The channel is disconnecting. void push (const RtecEventComm::EventSet &events, - CORBA::Environment &); + CORBA::Environment &); // Takes a timestamp and then pushes event_ to all consumers, either // directly, or via a channel. diff --git a/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h b/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h index acc872f2ee1..d783604a6be 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h +++ b/TAO/orbsvcs/tests/ImplRepo/ir_implrepo_impl.h @@ -5,7 +5,7 @@ // // = LIBRARY // TAO/orbsvcs/tests/ImplRepo -// +// // = FILENAME // ir_implrepo_impl.h // @@ -14,11 +14,11 @@ // // = AUTHOR // Darrell Brunsch <brunsch@cs.wustl.edu> -// +// // ============================================================================ -#if !defined (IR_IMPLREPO_IMPL_H) -#define IR_IMPLREPO_IMPL_H +#ifndef IR_IMPLREPO_IMPL_H +#define IR_IMPLREPO_IMPL_H #include "Impl_RepoS.h" #include "tao/TAO.h" @@ -36,7 +36,7 @@ typedef IR_Simple_i_ptr IR_Simple_i_ref; class IR_iRepo_i : public POA_Implementation_Repository { // = TITLE - // Implementation Repository + // Implementation Repository // // = DESCRIPTION // This provides the interface to communicate directly with the @@ -55,14 +55,14 @@ public: CORBA::Object_ptr &obj, const Implementation_Repository::INET_Addr &addr, CORBA::Environment &_tao_environment); - + // = Other methods int init (int argc, char **argv, CORBA::Environment& env); // Initialize the Server state - parsing arguments and waiting int run (CORBA::Environment& env); - // Run the orb + // Run the orb void start (const char *server); // Starts the program registered as <server> @@ -101,7 +101,7 @@ class IR_Adapter_Activator : public POA_PortableServer::AdapterActivator // Implementation Repository Adapter Activator // // = DESCRIPTION - // Part of the Default Servant/DSI combination that forwards + // Part of the Default Servant/DSI combination that forwards // arbitrary requests. This allows for the setting up of child POAs // with default servants. public: @@ -122,7 +122,7 @@ class IR_Simple_i: public POA_simple_object // Simple Object Implementation // // = DESCRIPTION - // Implementation of a simple object that has two methods, one that + // Implementation of a simple object that has two methods, one that // returns the cube of a long, another that shuts down the server. public: // = Constructor and Destructor diff --git a/TAO/orbsvcs/tests/ImplRepo/ir_server_impl.h b/TAO/orbsvcs/tests/ImplRepo/ir_server_impl.h index 6da5fd7fc5c..df38d3b39f0 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ir_server_impl.h +++ b/TAO/orbsvcs/tests/ImplRepo/ir_server_impl.h @@ -18,7 +18,7 @@ // // ============================================================================ -#if !defined (IR_SERVER_IMPL_H) +#ifndef IR_SERVER_IMPL_H #define IR_SERVER_IMPL_H #include "ir_simple_object_impl.h" @@ -30,7 +30,7 @@ class IR_Server_i // CORBA Server Implementation // // = DESCRIPTION - // + // public: // = Initialization and termination methods. IR_Server_i (void); @@ -43,7 +43,7 @@ public: // Initialize the Server state - parsing arguments and waiting int run (CORBA::Environment& env); - // Run the orb + // Run the orb private: IR_Simple_i *server_impl_; diff --git a/TAO/orbsvcs/tests/ImplRepo/ir_simple_object_impl.h b/TAO/orbsvcs/tests/ImplRepo/ir_simple_object_impl.h index 53d178751b7..eb0d7fc24c0 100644 --- a/TAO/orbsvcs/tests/ImplRepo/ir_simple_object_impl.h +++ b/TAO/orbsvcs/tests/ImplRepo/ir_simple_object_impl.h @@ -5,7 +5,7 @@ // // = LIBRARY // TAO/tests/Simple -// +// // = FILENAME // simple_object_impl.h // @@ -14,11 +14,11 @@ // // = AUTHOR // Darrell Brunsch <brunsch@cs.wustl.edu> -// +// // ============================================================================ -#if !defined (IR_SIMPLE_OBJECT_IMPL_H) -#define IR_SIMPLE_OBJECT_IMPL_H +#ifndef IR_SIMPLE_OBJECT_IMPL_H +#define IR_SIMPLE_OBJECT_IMPL_H #include "Impl_RepoS.h" @@ -35,7 +35,7 @@ class IR_Simple_i: public POA_simple_object // Simple Object Implementation // // = DESCRIPTION - // Implementation of a simple object that has two methods, one that + // Implementation of a simple object that has two methods, one that // returns the cube of a long, another that shuts down the server. public: IR_Simple_i (CORBA::ORB_ptr orb_ptr, diff --git a/TAO/orbsvcs/tests/ImplRepo/server_impl.h b/TAO/orbsvcs/tests/ImplRepo/server_impl.h index a87424cff4a..c33e6edf8cd 100644 --- a/TAO/orbsvcs/tests/ImplRepo/server_impl.h +++ b/TAO/orbsvcs/tests/ImplRepo/server_impl.h @@ -18,7 +18,7 @@ // // ============================================================================ -#if !defined (SERVER_IMPL_H) +#ifndef SERVER_IMPL_H #define SERVER_IMPL_H #include "simple_object_impl.h" @@ -30,7 +30,7 @@ class Server_i // CORBA Server Implementation // // = DESCRIPTION - // + // public: // = Initialization and termination methods. Server_i (void); @@ -43,7 +43,7 @@ public: // Initialize the Server state - parsing arguments and waiting int run (CORBA::Environment& env); - // Run the orb + // Run the orb private: Simple_i server_impl; @@ -57,7 +57,7 @@ private: // The ORB manager. char *ir_server_key_; - + FILE *ior_output_file_; // File where the IOR of the server object is stored. diff --git a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h b/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h index 59bf4106b7b..1b0818a5444 100644 --- a/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h +++ b/TAO/orbsvcs/tests/ImplRepo/simple_object_impl.h @@ -5,7 +5,7 @@ // // = LIBRARY // TAO/tests/Simple -// +// // = FILENAME // simple_object_impl.h // @@ -14,11 +14,11 @@ // // = AUTHOR // Darrell Brunsch <brunsch@cs.wustl.edu> -// +// // ============================================================================ -#if !defined (SIMPLE_OBJECT_IMPL_H) -#define SIMPLE_OBJECT_IMPL_H +#ifndef SIMPLE_OBJECT_IMPL_H +#define SIMPLE_OBJECT_IMPL_H #include "Simple_ObjectS.h" @@ -35,7 +35,7 @@ class Simple_i: public POA_simple_object // Simple Object Implementation // // = DESCRIPTION - // Implementation of a simple object that has two methods, one that + // Implementation of a simple object that has two methods, one that // returns the cube of a long, another that shuts down the server. public: Simple_i (const char *obj_name = 0); diff --git a/TAO/orbsvcs/tests/Logger/Logging_Test_i.h b/TAO/orbsvcs/tests/Logger/Logging_Test_i.h index 7bd6d8d2622..748473ea51b 100644 --- a/TAO/orbsvcs/tests/Logger/Logging_Test_i.h +++ b/TAO/orbsvcs/tests/Logger/Logging_Test_i.h @@ -19,16 +19,21 @@ // // ============================================================================ -#if !defined (_LOG_CLIENT_H) +#ifndef _LOG_CLIENT_H #define _LOG_CLIENT_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/corba.h" #include "orbsvcs/CosNamingC.h" #include "orbsvcs/LoggerC.h" #include "orbsvcs/Naming/Naming_Utils.h" -class Logger_Client +class Logger_Client { // = TITLE // Defines a class that encapsulates behaviour of the Logger @@ -51,14 +56,14 @@ public: int init (int argc, char **argv); // Initialize the client communication endpoint with server. - + int run (void); // Execute client example code. - + private: int parse_args (void); // Parses the arguments passed on the command line. - + void init_record (Logger::Log_Record &newrec, Logger::Log_Priority lp, const char *msg); @@ -66,20 +71,20 @@ private: int init_naming_service (CORBA::Environment &env); // Initialises the name server and resolves the logger_factory - + int init_loggers (CORBA::Environment &env); // Instantiates the 2 logger member variables - + void show_record (Logger::Log_Record &newrec); // Shows contents of the record (for debugging purposes). - + TAO_Naming_Client my_name_client_; // An instance of the name client used for resolving the factory // objects. CORBA::ORB_var orb_; // Keep a pointer to the ORB for easy access - + int argc_; // # of arguments on the command line. @@ -88,7 +93,7 @@ private: Logger_Factory_var factory_; // A pointer to the Logger_Factory; used in init_loggers - + Logger_var logger_1_; // Logger obj ref. diff --git a/TAO/orbsvcs/tests/Logger/client.h b/TAO/orbsvcs/tests/Logger/client.h index 51cd09d3fd3..8a6e1978466 100644 --- a/TAO/orbsvcs/tests/Logger/client.h +++ b/TAO/orbsvcs/tests/Logger/client.h @@ -22,11 +22,16 @@ // ============================================================================ #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/corba.h" #include "orbsvcs/CosNamingC.h" #include "orbsvcs/LoggerC.h" -class Logger_Client +class Logger_Client { // = TITLE // Defines a class that encapsulates behaviour of the Logger @@ -60,28 +65,28 @@ private: void show_record (Logger::Log_Record &newrec); // Shows contents of the record (for debugging purposes) - + CORBA::Object_var resolve_name (CosNaming::Name &name, char* namestring, - CosNaming::NamingContext_var context, - CORBA::Environment &env); + CosNaming::NamingContext_var context, + CORBA::Environment &env); // Take the Name, give it the proper string name, and - // resolve it + // resolve it int nesting_test (CosNaming::Name &name, char* namestring, - CosNaming::NamingContext_var context, - CORBA::Environment &env); + CosNaming::NamingContext_var context, + CORBA::Environment &env); // Test the nesting context - + int argc_; // # of arguments on the command line. - + char **argv_; // arguments from command line. - + int test_nesting_; // Test nested naming context or not. - + CORBA::ORB_var orb_; // Keep a pointer to the orb, to avoid accidental deletes. diff --git a/TAO/orbsvcs/tests/Logger/client_i.h b/TAO/orbsvcs/tests/Logger/client_i.h index 9d19a096649..0ce8873035d 100644 --- a/TAO/orbsvcs/tests/Logger/client_i.h +++ b/TAO/orbsvcs/tests/Logger/client_i.h @@ -22,12 +22,17 @@ // @@ Add the guard against multiple inclusions. #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "tao/corba.h" #include "orbsvcs/CosNamingC.h" #include "orbsvcs/LoggerC.h" #include "orbsvcs/Naming/Naming_Utils.h" -class Logger_Client +class Logger_Client { // = TITLE // Defines a class that encapsulates behaviour of the Logger @@ -50,14 +55,14 @@ public: int init (int argc, char **argv); // Initialize the client communication endpoint with server. - + int run (void); // Execute client example code. - + private: int parse_args (void); // Parses the arguments passed on the command line. - + void init_record (Logger::Log_Record &newrec, Logger::Log_Priority lp, const char *msg); @@ -65,20 +70,20 @@ private: int init_naming_service (CORBA::Environment &env); // Initialises the name server and resolves the logger_factory - + int init_loggers (CORBA::Environment &env); // Instantiates the 2 logger member variables - + void show_record (Logger::Log_Record &newrec); // Shows contents of the record (for debugging purposes). - + TAO_Naming_Client my_name_client_; // An instance of the name client used for resolving the factory // objects. CORBA::ORB_var orb_; // Keep a pointer to the ORB for easy access - + int argc_; // # of arguments on the command line. @@ -87,7 +92,7 @@ private: Logger_Factory_var factory_; // A pointer to the Logger_Factory; used in init_loggers - + Logger_var logger_1_; // Logger obj ref. diff --git a/TAO/orbsvcs/tests/Logger/server_i.h b/TAO/orbsvcs/tests/Logger/server_i.h index 94b95ae1d6a..0a8736a8ab0 100644 --- a/TAO/orbsvcs/tests/Logger/server_i.h +++ b/TAO/orbsvcs/tests/Logger/server_i.h @@ -19,10 +19,15 @@ // // ============================================================================ -#if !defined (_C_SERVER_H) +#ifndef _C_SERVER_H #define _C_SERVER_H #include "ace/Get_Opt.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Log_Msg.h" #include "tao/TAO.h" #include "orbsvcs/CosNamingC.h" @@ -50,11 +55,11 @@ public: int init (int argc, char **argv, - CORBA::Environment& env); + CORBA::Environment& env); // Initialize the Logger_Server state - parsing arguments and ... int run (CORBA::Environment& env); - // Run the ORB. + // Run the ORB. private: int parse_args (void); @@ -73,7 +78,7 @@ private: Logger_Factory_i factory_impl_; // Implementation object of the Logger_Factory. - + Logger_Factory_var factory_; // Factory_var to register with NamingService. diff --git a/TAO/orbsvcs/tests/Property/client.h b/TAO/orbsvcs/tests/Property/client.h index 3ac62f02c2d..dab07813f50 100644 --- a/TAO/orbsvcs/tests/Property/client.h +++ b/TAO/orbsvcs/tests/Property/client.h @@ -17,10 +17,15 @@ // // ============================================================================ -#if !defined (PROPERTY_CLIENT_H) +#ifndef PROPERTY_CLIENT_H #define PROPERTY_CLIENT_H #include "ace/Synch.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Task.h" #include "ace/Thread_Manager.h" #include "ace/Get_Opt.h" @@ -94,7 +99,7 @@ protected: TAO_Naming_Client my_name_client_; // The Naming Client handles Naming Service work - + CosPropertyService::PropertySetDef_var propsetdef_; // To test propertySetDef interface. }; diff --git a/TAO/orbsvcs/tests/Property/server.h b/TAO/orbsvcs/tests/Property/server.h index 06f6b41a455..09e5fa5a52b 100644 --- a/TAO/orbsvcs/tests/Property/server.h +++ b/TAO/orbsvcs/tests/Property/server.h @@ -17,7 +17,7 @@ // // ============================================================================ -#if !defined (COSPROPERTYSERVICE_SERVER_H) +#ifndef COSPROPERTYSERVICE_SERVER_H #define COSPROPERTYSERVICE_SERVER_H #include "tao/TAO.h" diff --git a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h index 8e783496ce8..6f0721b2376 100644 --- a/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h +++ b/TAO/orbsvcs/tests/Sched_Conf/Sched_Conf_Runtime.h @@ -52,7 +52,7 @@ static int configs_size = sizeof(configs)/sizeof(configs[0]); // This sets up Scheduler_Factory to use the runtime version -int scheduler_factory_setup = +int scheduler_factory_setup = ACE_Scheduler_Factory::use_runtime (configs_size, configs, infos_size, infos); // EOF diff --git a/TAO/orbsvcs/tests/Simple_Naming/client.h b/TAO/orbsvcs/tests/Simple_Naming/client.h index 9b63c09979b..2f6e86e8cfe 100644 --- a/TAO/orbsvcs/tests/Simple_Naming/client.h +++ b/TAO/orbsvcs/tests/Simple_Naming/client.h @@ -22,12 +22,12 @@ #include "orbsvcs/Naming/Naming_Utils.h" #include "orbsvcs/CosNamingC.h" -class Naming_Test +class Naming_Test { // = TITLE // This is an abstract class which is subclassed // to create different Naming Service tests. - // + // // = DESCRIPTION // This is a basic example of the "Strategy" pattern. This class // provides a common interface for different tests (or @@ -53,7 +53,7 @@ public: // Execute the simple test code. }; -class Tree_Test : public Naming_Test +class Tree_Test : public Naming_Test { // = TITLE // This class implements a test of all Naming Service functions @@ -61,13 +61,13 @@ class Tree_Test : public Naming_Test // // = DESCRIPTION // Bind_context() under the root context with the name level1. - // Create_new_context(), bind() foo object into it, and + // Create_new_context(), bind() foo object into it, and // bind the context into root/level1 under the name level2. // Resolve (root/level1/level2/foo). // Unbind (root/level1/level2/foo). // Bind (root/level1/level2/foo, obj) // Create_new_context() - // and invoke rebind_context() to substitute it for the current + // and invoke rebind_context() to substitute it for the current // level2 context. // Bind (root/level1/level2/foo, obj) // Resolve (root/level1/level2/foo). @@ -78,7 +78,7 @@ public: // Execute the tree test code. }; -class Iterator_Test : public Naming_Test +class Iterator_Test : public Naming_Test { // = TITLE // This class implements a test of Naming Service functions @@ -94,16 +94,16 @@ public: virtual int execute (TAO_Naming_Client &root_context); // Execute the iterator test code. }; - -class Exceptions_Test : public Naming_Test + +class Exceptions_Test : public Naming_Test { // = TITLE // This class implements a test of exceptions in the Naming Service. // // = DESCRIPTION // Makes sure that Naming Service throws exceptions as expected, and - // data inside exceptions is set correctly. The test creates a tree of - // of Naming Contexts: root context -> level1 -> level2. It then binds() an + // data inside exceptions is set correctly. The test creates a tree of + // of Naming Contexts: root context -> level1 -> level2. It then binds() an // object with the name foo to each of Naming Contexts in the tree. // Invoke resolve() with a Name of length 0 - make sure we get InvalidName exception. // Invoke bind( foo, obj) on root context - make sure we get AlreadyBound exception. @@ -136,7 +136,7 @@ private: CORBA::Environment &_env); }; -class Destroy_Test : public Naming_Test +class Destroy_Test : public Naming_Test { // = TITLE // This class implements a test of destroy() function @@ -149,7 +149,7 @@ class Destroy_Test : public Naming_Test // Unbind the object and call destroy on the context. // Attempt to call destroy on the object again - OBJECT_NOT_EXIST // exception should be raised. - // + // public: virtual int execute (TAO_Naming_Client &root_context); // Execute the destroy test code. @@ -157,12 +157,12 @@ public: private: // = The following functions isolate specific tests. void not_empty_test (CosNaming::NamingContext_var &ref, - CORBA::Environment &_env); + CORBA::Environment &_env); void not_exist_test (CosNaming::NamingContext_var &ref, - CORBA::Environment &_env); + CORBA::Environment &_env); }; -class CosNaming_Client +class CosNaming_Client { // = TITLE, // Defines a class that encapsulates behaviour of the CosNaming @@ -190,7 +190,7 @@ public: // Initialize the client communication endpoint with server. // = Symbolic ids. - enum + enum { OBJ1_ID = 5, OBJ2_ID = 6 diff --git a/TAO/orbsvcs/tests/Trading/Offer_Exporter.h b/TAO/orbsvcs/tests/Trading/Offer_Exporter.h index 17eb8b73e1b..52139a62312 100644 --- a/TAO/orbsvcs/tests/Trading/Offer_Exporter.h +++ b/TAO/orbsvcs/tests/Trading/Offer_Exporter.h @@ -2,7 +2,7 @@ // ======================================================================== // -// = FILE +// = FILE // Offer_Exporter.h // // = DESCRIPTION @@ -11,7 +11,7 @@ // = AUTHOR // Seth Widoff <sbw1@cs.wustl.edu> // -// ======================================================================= +// ======================================================================= #ifndef TAO_OFFER_EXPORTER_H #define TAO_OFFER_EXPORTER_H @@ -25,106 +25,106 @@ public: TAO_Offer_Exporter (CosTrading::Lookup_ptr lookup_if, CORBA::Boolean verbose, - CORBA::Environment& env) + CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException)); ~TAO_Offer_Exporter (void); - + void export_offers (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); - // Export a number of offers to the Trading Service. - + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); + // Export a number of offers to the Trading Service. + void export_offers_to_all (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); // Export a number of offers to all traders accessible by the // bootstrapped trader. - + void withdraw_offers (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)); // Withdraw all exported offers. void describe_offers (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId)); // Describe all the offers registered with the bootstrapped trader. void modify_offers (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::NotImplemented, - CosTrading::IllegalOfferId, - CosTrading::UnknownOfferId, - CosTrading::Register::ProxyOfferId, - CosTrading::IllegalPropertyName, - CosTrading::Register::UnknownPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::Register::MandatoryProperty, - CosTrading::Register::ReadonlyProperty, - CosTrading::DuplicatePropertyName)); - // Remove some properties and change some properties in each offer. + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::NotImplemented, + CosTrading::IllegalOfferId, + CosTrading::UnknownOfferId, + CosTrading::Register::ProxyOfferId, + CosTrading::IllegalPropertyName, + CosTrading::Register::UnknownPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::Register::MandatoryProperty, + CosTrading::Register::ReadonlyProperty, + CosTrading::DuplicatePropertyName)); + // Remove some properties and change some properties in each offer. void withdraw_offers_using_constraints (CORBA::Environment& env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Register::NoMatchingOffers)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Register::NoMatchingOffers)); // Withdraw a number of offers based on a constraint string. - + private: CosTrading::OfferIdSeq* grab_offerids (CORBA::Environment& env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::NotImplemented)); + CosTrading::NotImplemented)); void create_offers (void); // Fill in each of the offer structures. void export_to (CosTrading::Register_ptr reg, CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::Register::InvalidObjectRef, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::Register::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::PropertyTypeMismatch, - CosTrading::ReadonlyDynamicProperty, - CosTrading::MissingMandatoryProperty, - CosTrading::DuplicatePropertyName)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::Register::InvalidObjectRef, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::Register::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::PropertyTypeMismatch, + CosTrading::ReadonlyDynamicProperty, + CosTrading::MissingMandatoryProperty, + CosTrading::DuplicatePropertyName)); // Export the offers to the give Register interface. typedef ACE_Unbounded_Queue<TAO_Dynamic_Property*> DP_Queue; CORBA::Boolean verbose_; // True if the user wants verbose output. - + CosTrading::Register_var register_; CosTrading::Admin_var admin_; - + TT_Info::Printer printer_[NUM_OFFERS]; TT_Info::Plotter plotter_[NUM_OFFERS]; TT_Info::File_System fs_[NUM_OFFERS]; @@ -134,7 +134,7 @@ private: CosTrading::PropertySeq props_printers_[NUM_OFFERS]; CosTrading::PropertySeq props_fs_[NUM_OFFERS]; // Property sequences describing each service. - + DP_Queue clean_up_; // A list of dynamic properties to clean up upon destruction. }; diff --git a/TAO/orbsvcs/tests/Trading/Offer_Importer.h b/TAO/orbsvcs/tests/Trading/Offer_Importer.h index ce620dcae4e..759c434ef5c 100644 --- a/TAO/orbsvcs/tests/Trading/Offer_Importer.h +++ b/TAO/orbsvcs/tests/Trading/Offer_Importer.h @@ -2,7 +2,7 @@ // ======================================================================== // -// = FILE +// = FILE // Offer_Importer.h // // = DESCRIPTION @@ -11,13 +11,18 @@ // = AUTHOR // Seth Widoff <sbw1@cs.wustl.edu> // -// ======================================================================= +// ======================================================================= #ifndef TAO_OFFER_IMPORTER #define TAO_OFFER_IMPORTER #include "TT_Info.h" #include "ace/Task_T.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "orbsvcs/Trader/Trader_Utils.h" class TAO_Offer_Importer @@ -29,62 +34,62 @@ public: void perform_queries (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Lookup::IllegalPreference, - CosTrading::Lookup::IllegalPolicyName, - CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); // Barrage the bootstrapped-to trader with queries. void perform_directed_queries (CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Lookup::IllegalPreference, - CosTrading::Lookup::IllegalPolicyName, - CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); // Direct a query to a trader two graph edges distant from the // bootstrapped-to trader. - + private: void perform_queries_with_policies (const TAO_Policy_Manager& policy_manager, CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTrading::IllegalConstraint, - CosTrading::Lookup::IllegalPreference, - CosTrading::Lookup::IllegalPolicyName, - CosTrading::Lookup::PolicyTypeMismatch, - CosTrading::Lookup::InvalidPolicyValue, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTrading::DuplicatePolicyName)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTrading::IllegalConstraint, + CosTrading::Lookup::IllegalPreference, + CosTrading::Lookup::IllegalPolicyName, + CosTrading::Lookup::PolicyTypeMismatch, + CosTrading::Lookup::InvalidPolicyValue, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTrading::DuplicatePolicyName)); // Perform a query on the bootstrapped-to trader given the policies // pass in <policy_manager>. - + void display_results (const CosTrading::OfferSeq& offer_seq, - CosTrading::OfferIterator_ptr offer_iterator, - CORBA::Environment& _env) const + CosTrading::OfferIterator_ptr offer_iterator, + CORBA::Environment& _env) const TAO_THROW_SPEC ((CORBA::SystemException)); // Display the results of the query to the screen. CORBA::Boolean verbose_; // Output the contents of each returned offer, if true. - + CosTrading::Lookup_ptr lookup_; - // The interface on which to perform all those wonderful queries. + // The interface on which to perform all those wonderful queries. }; #endif /* TAO_OFFER_IMPORTER */ diff --git a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h index a695c4ef495..004caf3410d 100644 --- a/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h +++ b/TAO/orbsvcs/tests/Trading/Service_Type_Exporter.h @@ -2,7 +2,7 @@ // ======================================================================== // -// = FILE +// = FILE // Offer_Exporter.h // // = DESCRIPTION @@ -11,7 +11,7 @@ // = AUTHOR // Seth Widoff <sbw1@cs.wustl.edu> // -// ======================================================================= +// ======================================================================= #ifndef TAO_SERVICE_TYPE_EXPORTER_H #define TAO_SERVICE_TYPE_EXPORTER_H @@ -26,96 +26,96 @@ public: CORBA::Boolean verbose, CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)); - + void remove_all_types (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::HasSubTypes)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::HasSubTypes)); // Remove all service types from the trading service instance. - + void add_all_types (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, - CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); - // Add all the generated service types to the trading service instance. + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + // Add all the generated service types to the trading service instance. void add_all_types_to_all (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, - CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); // Add all the generated service types to all the trading service // instances linked to the trading service we bootstrapped to. - + void list_all_types (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)); // List all the service types registered with the trading service - // instance. + // instance. void describe_all_types (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType)); + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)); // Describe all the service types registered with the trading - // service instance. + // service instance. void fully_describe_all_types (CORBA::Environment& _env) - TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTrading::UnknownServiceType)); + TAO_THROW_SPEC ((CORBA::SystemException, + CosTrading::IllegalServiceType, + CosTrading::UnknownServiceType)); // Same as describe_all_types, but fully describe lists the // properties of all service types the described service type - // inherits from. - + // inherits from. + private: void create_types (void); - // Generate the service type description structures. - + // Generate the service type description structures. + void add_all_types_to (CosTradingRepos::ServiceTypeRepository_ptr repos, CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException, - CosTrading::IllegalServiceType, - CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, - CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, - CosTrading::IllegalPropertyName, - CosTrading::DuplicatePropertyName, - CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, - CosTrading::UnknownServiceType, - CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); + CosTrading::IllegalServiceType, + CosTradingRepos::ServiceTypeRepository::ServiceTypeExists, + CosTradingRepos::ServiceTypeRepository::InterfaceTypeMismatch, + CosTrading::IllegalPropertyName, + CosTrading::DuplicatePropertyName, + CosTradingRepos::ServiceTypeRepository::ValueTypeRedefinition, + CosTrading::UnknownServiceType, + CosTradingRepos::ServiceTypeRepository::DuplicateServiceTypeName)); // Add all types to a sepcified service type repository reference. - - void + + void dump_typestruct (const char* type_name, - const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct) const; + const CosTradingRepos::ServiceTypeRepository::TypeStruct& type_struct) const; // Dump the contents of a service type description to standard - // output. + // output. CORBA::Boolean verbose_; // True if the user want profuse output. - + CosTrading::Lookup_ptr lookup_; // A reference to the lookup interface of the trading service - // instance. - + // instance. + CosTradingRepos::ServiceTypeRepository_var repos_; - // A reference to a service type repository instance. - + // A reference to a service type repository instance. + CosTradingRepos::ServiceTypeRepository::TypeStruct type_structs_[NUM_TYPES]; // Descriptions of all the service types whose property names are - // defined in TT_Info. + // defined in TT_Info. }; #endif /* TAO_SERVICE_TYPE_EXPORTER_H */ diff --git a/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h b/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h index 09817920f5c..8dc42e58f4c 100644 --- a/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h +++ b/TAO/orbsvcs/tests/Trading/Simple_Dynamic.h @@ -2,7 +2,7 @@ // ======================================================================== // -// = FILE +// = FILE // Simple_Dyanmic.h // // = DESCRIPTION @@ -11,7 +11,7 @@ // = AUTHOR // Seth Widoff <sbw1@cs.wustl.edu> // -// ======================================================================= +// ======================================================================= #ifndef TAO_SIMPLE_DYNAMIC_H #define TAO_SIMPLE_DYNAMIC_H @@ -21,14 +21,14 @@ template<class T> class TAO_Simple_Dynamic_Property : public TAO_Dynamic_Property { -public: +public: TAO_Simple_Dynamic_Property (const T& dp); - + virtual CORBA::Any* evalDP (const char* name, CORBA::TypeCode_ptr returned_type, - const CORBA::Any& extra_info, - CORBA::Environment& _env) + const CORBA::Any& extra_info, + CORBA::Environment& _env) TAO_THROW_SPEC ((CosTradingDynamic::DPEvalFailure)); private: diff --git a/TAO/orbsvcs/tests/Trading/TT_Info.h b/TAO/orbsvcs/tests/Trading/TT_Info.h index efc7f96b1ad..89ed2742f50 100644 --- a/TAO/orbsvcs/tests/Trading/TT_Info.h +++ b/TAO/orbsvcs/tests/Trading/TT_Info.h @@ -11,9 +11,9 @@ class TT_Info public: static void dump_properties (const CosTrading::PropertySeq& prop_seq, - CORBA::Boolean print_dynamic = 1); + CORBA::Boolean print_dynamic = 1); // Dump the contents of this property sequence. - + enum INTERFACES { REMOTE_IO, @@ -24,20 +24,20 @@ public: }; // = Test servants. - + class Remote_Output : public POA_TAO_Trader_Test::Remote_Output { public: - + Remote_Output (void) {} - + virtual void confirm (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)) {} // Method to test that the importer received a valid reference to // the exported object. }; - + class Printer : public POA_TAO_Trader_Test::Printer { @@ -48,33 +48,33 @@ public: virtual void confirm (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)) {} // Method to test that the importer received a valid reference to - // the exported object. + // the exported object. }; - + class Plotter : public POA_TAO_Trader_Test::Plotter { public: Plotter (void) {} - + virtual void confirm (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)) {} // Method to test that the importer received a valid reference to - // the exported object. + // the exported object. }; - + class File_System : public POA_TAO_Trader_Test::File_System { - public: + public: File_System (void) {} virtual void confirm (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)) {} // Method to test that the importer received a valid reference to - // the exported object. + // the exported object. }; - + class PostScript_Printer : public POA_TAO_Trader_Test::PostScript_Printer { @@ -84,14 +84,14 @@ public: virtual void confirm (CORBA::Environment& _env) TAO_THROW_SPEC ((CORBA::SystemException)) {} // Method to test that the importer received a valid reference to - // the exported object. + // the exported object. }; #define NUM_TYPES 5 static const char* INTERFACE_NAMES[]; - + // = Remote IO property descriptions - + enum REMOTE_IO_PROPERTIES { NAME, @@ -104,9 +104,9 @@ public: static const char* REMOTE_IO_NAME; static const char* REMOTE_IO_PROPERTY_NAMES[]; - - // = Plotter property descriptions - + + // = Plotter property descriptions + enum PLOTTER_PROPERTIES { PLOTTER_NUM_COLORS, @@ -118,10 +118,10 @@ public: }; static const char* PLOTTER_NAME; - static const char* PLOTTER_PROPERTY_NAMES[]; - + static const char* PLOTTER_PROPERTY_NAMES[]; + // = Printer property descriptions - + enum PRINTER_PROPERTIES { PRINTER_COLOR, @@ -135,9 +135,9 @@ public: static const char* PRINTER_NAME; static const char* PRINTER_PROPERTY_NAMES[]; - + // = File System Property Descriptions - + enum FILESYSTEM_PROPERTIES { DISK_SIZE, @@ -148,8 +148,8 @@ public: static const char* FILESYSTEM_NAME; static const char* FILESYSTEM_PROPERTY_NAMES[]; - // = PostScript Printer property descriptions. - + // = PostScript Printer property descriptions. + enum PS_PRINTER_PROPERTIES { VERSION @@ -157,7 +157,7 @@ public: static const char* PS_PRINTER_NAME; static const char* PS_PRINTER_PROPERTY_NAMES[]; - + // = Offer Info #define NUM_OFFERS 15 @@ -166,9 +166,9 @@ public: static const char* MODEL_NUMBERS[]; // = Query info - + static const int NUM_QUERIES; - static const char* QUERIES[][3]; + static const char* QUERIES[][3]; }; #endif /* TAO_TRADER_TEST_UTILS_H */ |