summaryrefslogtreecommitdiff
path: root/TAO/utils/IOR-parser
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-20 02:34:57 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-10-20 02:34:57 +0000
commit5c1001ce4f585836e1f83c28d1df89aee42fb743 (patch)
tree5967e9ca7d44ed1d2823be9746817ebb8e025f5d /TAO/utils/IOR-parser
parent2ae14b2b85ad813a269e8a5529aa76cf984fa8a5 (diff)
downloadATCD-5c1001ce4f585836e1f83c28d1df89aee42fb743.tar.gz
changed include protection from #if !defined to ifndef, and added #pragma once, if possible
Diffstat (limited to 'TAO/utils/IOR-parser')
-rw-r--r--TAO/utils/IOR-parser/ior-handler.h53
1 files changed, 29 insertions, 24 deletions
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__ */