From 5c1001ce4f585836e1f83c28d1df89aee42fb743 Mon Sep 17 00:00:00 2001 From: levine Date: Tue, 20 Oct 1998 02:34:57 +0000 Subject: changed include protection from #if !defined to ifndef, and added #pragma once, if possible --- TAO/utils/IOR-parser/ior-handler.h | 53 +++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 24 deletions(-) (limited to 'TAO/utils/IOR-parser/ior-handler.h') diff --git a/TAO/utils/IOR-parser/ior-handler.h b/TAO/utils/IOR-parser/ior-handler.h index f1d6eb4f263..ff8970d488f 100644 --- a/TAO/utils/IOR-parser/ior-handler.h +++ b/TAO/utils/IOR-parser/ior-handler.h @@ -16,10 +16,15 @@ // // ============================================================================ -#if !defined (__IORPARSER_H__) +#ifndef __IORPARSER_H__ #define __IORPARSER_H__ #include "ace/OS.h" + +#if !defined (ACE_LACKS_PRAGMA_ONCE) +# pragma once +#endif /* ACE_LACKS_PRAGMA_ONCE */ + #include "ace/Basic_Types.h" // To determine BYTE_ORDER // Maximum length of the stringified IOR, the type_id, and the @@ -38,57 +43,57 @@ class IOR // // = DESCRIPTION // This structure assumes that the profile_id is - // TAG_INTERNET_IOP and that there is only one TaggedProfile in + // TAG_INTERNET_IOP and that there is only one TaggedProfile in // the IOR. public: u_long typeIdLen; // The length of the type_id field of the IOR - + char typeId[MAX_TYPE_ID_LEN]; // The string in the type_id field of the IOR - + char idlInterface[MAX_TYPE_ID_LEN]; // The IDL interface of the server that published the IOR (can be extracted // from the type_id field) - + u_long profileBodyLen; // The length of the body of the profile field of the IOR - + u_long hostLen; // The length of the hostname embedded in the IOR - + char HostName[MAX_HOSTNAME_LEN]; // The server's hostname embedded in the IOR - + u_long portNum; // The server's port number embedded in the IOR - + u_long objectKeyLen; // The length of the object_key field of the IOR - + char objectKey[MAX_OBJ_KEY_LEN]; // The object_key field of the IOR }; class IorHandler { - // = TITLE + // = TITLE // This is the class that takes in a real (valid) IOR and // parses it. // // = DESCRIPTION // This class prints out the useful information in the - // IORs generated by VisiBroker, Orbix and TAO + // IORs generated by VisiBroker, Orbix and TAO public: IorHandler (void); // Constructor - + void interpretIor (char *thisIor, struct IOR *thisIorInfo); // The main IOR parsing routine - + char *getIdlInterface (char *typeId, int *validTypeId); // Extracts the IDL interface from the type_id field in the IOR - + void readIorFromFile (char *filename); // Reads in the IOR from a specified file @@ -96,25 +101,25 @@ public: // Holds the stringified IOR during parsing struct IOR parsedIOR; - // Holds the parsed IOR + // Holds the parsed IOR private: int hexChar2int (char thisChar); // Converts a pair of hexadecimal-encoded characters in the stringified - // IOR into their integer value - + // IOR into their integer value + u_long getOctet8Field (char *readPtr, int *hexCharsRead); // Interpret the next 8 octets into an unsigned long - + u_long getOctet4Field (char *readPtr, int *hexCharsRead); // Interpret the next 4 octets into an unsigned long - + u_long getOctet2Field (char *readPtr, int *hexCharsRead); // Interpret the next 2 octets into an unsigned long void skipSpaceIfAny (char *readPtr, int *hexCharsRead); - // Skip the space character encountered while parsing the IOR - + // Skip the space character encountered while parsing the IOR + void skipNullOctets (char *readPtr, int *hexCharsRead, int expectingStr); // Skip the null octets encountered while parsing the IOR @@ -123,10 +128,10 @@ private: char getCharacter (char *readPtr, int *offset); // Extracts a single character from the IOR - + char *getString (char *readPtr, int givenLen); // Extracts a character string of a given length from the IOR - + }; #endif /* __IORPARSER_H__ */ -- cgit v1.2.1