diff options
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.h')
-rw-r--r-- | TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.h | 170 |
1 files changed, 78 insertions, 92 deletions
diff --git a/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.h b/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.h index 92e1cbd4323..37151ea734a 100644 --- a/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.h +++ b/TAO/orbsvcs/orbsvcs/AV/FlowSpec_Entry.h @@ -1,15 +1,19 @@ /* -*- C++ -*- */ +//$Id$ // ============================================================================ -/** - * @file FlowSpec_Entry.h - * - * $Id$ - * - * @author Nagarajan Surendran <naga@cs.wustl.edu> - * - */ +// +// = LIBRARY +// ORBSVCS (AVStreams) +// +// = FILENAME +// FlowSpec_Entry.h +// +// = AUTHOR +// Nagarajan Surendran <naga@cs.wustl.edu> +// +// // ============================================================================ #ifndef TAO_AV_FLOWSPEC_ENTRY_H @@ -20,27 +24,23 @@ #include "AV_Core.h" #include "ace/Addr.h" -/** - * @class TAO_Tokenizer - * @brief - */ class TAO_AV_Export TAO_Tokenizer { public: - /// constructor. TAO_Tokenizer (const char *string,char delimiter); + // constructor. - /// destructor. ~TAO_Tokenizer (); + // destructor. - /// parses the string and tokenizes it. int parse (const char *string,char delimiter); + // parses the string and tokenizes it. - /// Returns the next token. char *token (void); + // Returns the next token. - /// Number of tokens. int num_tokens (void); + // Number of tokens. char *operator [] (size_t index) const; @@ -56,15 +56,11 @@ class TAO_AV_Transport; class TAO_AV_Flow_Handler; class TAO_AV_Protocol_Object; -/** - * @class TAO_FlowSpec_Entry - * @brief A helper entry class in the flow spec sequence passed to - * bind_devs. - */ class TAO_AV_Export TAO_FlowSpec_Entry { public: - + // = TITLE + // An helper entry class in the flow spec sequence passed to bind_devs. enum Direction { TAO_AV_INVALID = -1, @@ -79,16 +75,16 @@ public: TAO_AV_CONSUMER = 1 }; - /// default constructor. TAO_FlowSpec_Entry (void); + // default constructor. - /// constructor to construct an entry from the arguments. TAO_FlowSpec_Entry (const char *flowname, const char *direction, const char *format_name, const char *flow_protocol, const char *carrier_protocol, ACE_Addr *address); + // constructor to construct an entry from the arguments. TAO_FlowSpec_Entry (const char *flowname, const char *direction, @@ -96,46 +92,46 @@ public: const char *flow_protocol, const char *address); - /// construct the entry from a string specified by the flowSpec grammar. virtual int parse (const char* flowSpec_entry) = 0; + // construct the entry from a string specified by the flowSpec grammar. - /// virtual destructor. virtual ~TAO_FlowSpec_Entry (void); + // virtual destructor. - /// accessor to the direction. int direction (void); + // accessor to the direction. virtual Role role (void) = 0; void role (Role role); - /// accessor to string version of direction . - const char * direction_str (void) const; + char * direction_str (void); + // string version of direction . - /// accessor to the flow protocol string. - const char *flow_protocol_str (void) const; + char *flow_protocol_str (void); + // accesor to the flow protocol string. - /// set the flow protocol string. void flow_protocol_str (const char *flow_protocol_str); + // set the flow protocol string. - /// accessor to address of the carrier protocol. ACE_Addr *address (void); + // Address of the carrier protocol. - /// Address in string format i. hostname:port. - const char * address_str (void) const; + char * address_str (void); + // Address in string format i. hostname:port. - /// accessor to carrier protocol i.e TCP,UDP,RTP/UDP. TAO_AV_Core::Protocol carrier_protocol (void); + // carrier protocol i.e TCP,UDP,RTP/UDP. - /// accessor to string version of carrier protocol. - const char * carrier_protocol_str (void) const; + char * carrier_protocol_str (void); + // string version of carrier protocol. - /// accessor to format to be used for this flow. - const char *format (void) const; + char *format (void); + // format to be used for this flow. - /// accessor to name of this flow. - const char *flowname (void) const; + const char *flowname (void); + // name of this flow. - /// converts the entry to a string. - virtual const char *entry_to_string (void) = 0; + virtual char *entry_to_string (void) = 0; + // converts the entry to a string. int set_peer_addr (ACE_Addr *peer_addr); ACE_Addr *get_peer_addr (void); @@ -149,54 +145,54 @@ public: TAO_AV_Protocol_Object* protocol_object (void); void protocol_object (TAO_AV_Protocol_Object *object); - /// sets the address for this flow. - int parse_address (const char *format_string); + int parse_address (char *format_string); + // sets the address for this flow. - /// returns true for a multicast address. int is_multicast (void); + // returns true for a multicast address. protected: - /// parses the flow protocol string with tokens separated by : - int parse_flow_protocol_string (const char *flow_options_string); + int parse_flow_protocol_string (char *flow_options_string); + // parses the flow protocol string with tokens separated by : + + int set_direction (char *direction_string); + // sets the direction flag. - /// sets the direction flag. - int set_direction (const char *direction_string); - /// sets the protocol_ enum from the carrier_protocol_ string. int set_protocol (void); + // sets the protocol_ enum from the carrier_protocol_ string. - /// Addr information for the carrier protocol. ACE_Addr *address_; + // Addr information for the carrier protocol. - /// Addr in string format i.e hostname:port. - ACE_CString address_str_; + char *address_str_; + // Addr in string format i.e hostname:port. - /// format string. - ACE_CString format_; + char *format_; + // format string. - /// Direction of this flow. Direction direction_; + // Direction of this flow. - /// string representation of the direction. - ACE_CString direction_str_; + char *direction_str_; + // string representation of the direction. - /// name of this flow. - ACE_CString flowname_; + char *flowname_; + // name of this flow. - /// name of the protocol used. TAO_AV_Core::Protocol protocol_; + // name of the protocol used. - /// carrier protocol string. - ACE_CString carrier_protocol_; + char *carrier_protocol_; + // carrier protocol string. - /// flow protocol string. - ACE_CString flow_protocol_; + char *flow_protocol_; + // flow protocol string. int use_flow_protocol_; - - /// The flowspec entry; - ACE_CString entry_; + char *entry_; + // The flowspec entry; int is_multicast_; ACE_Addr *peer_addr_; @@ -207,10 +203,6 @@ protected: Role role_; }; -/** - * @class TAO_Forward_FlowSpec_Entry - * @brief - */ class TAO_AV_Export TAO_Forward_FlowSpec_Entry :public TAO_FlowSpec_Entry { @@ -221,16 +213,16 @@ public: TAO_AV_FLOW_PROTOCOL = 3, TAO_AV_ADDRESS = 4}; - /// default constructor. TAO_Forward_FlowSpec_Entry (void); + // default constructor. - /// constructor to construct an entry from the arguments. TAO_Forward_FlowSpec_Entry (const char *flowname, const char *direction, const char *format_name, const char *flow_protocol, const char *carrier_protocol, ACE_Addr *address); + // constructor to construct an entry from the arguments. TAO_Forward_FlowSpec_Entry (const char *flowname, const char *direction, @@ -238,19 +230,14 @@ public: const char *flow_protocol, const char *address); - /// converts the entry to a string. - virtual const char *entry_to_string (void); + virtual char *entry_to_string (void); + // converts the entry to a string. virtual Role role (void); - - /// construct the entry from a string specified by the flowSpec grammar. virtual int parse (const char* flowSpec_entry); + // construct the entry from a string specified by the flowSpec grammar. }; -/** - * @class TAO_Reverse_FlowSpec_Entry - * @brief - */ class TAO_AV_Export TAO_Reverse_FlowSpec_Entry :public TAO_FlowSpec_Entry { @@ -261,31 +248,30 @@ public: TAO_AV_DIRECTION = 3, TAO_AV_FORMAT = 4}; - // default constructor. TAO_Reverse_FlowSpec_Entry (void); + // default constructor. - // constructor to construct an entry from the arguments. TAO_Reverse_FlowSpec_Entry (const char *flowname, const char *direction, const char *format_name, const char *flow_protocol, const char *carrier_protocol, ACE_Addr *address); + // constructor to construct an entry from the arguments. - // Takes the address in protocol=endpoint form. TAO_Reverse_FlowSpec_Entry (const char *flowname, const char *direction, const char *format_name, const char *flow_protocol, const char *address); + // Takes the address in protocol=endpoint form. - /// converts the entry to a string. - virtual const char *entry_to_string (void); + virtual char *entry_to_string (void); + // converts the entry to a string. virtual Role role (void); - - /// construct the entry from a string specified by the flowSpec grammar. virtual int parse (const char* flowSpec_entry); + // construct the entry from a string specified by the flowSpec grammar. }; #include "Transport.h" |