summaryrefslogtreecommitdiff
path: root/TAO/tao/IOR_Parser.h
blob: 0058a743a0e8133f4c4e42915b0b2301aa19d06a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// -*- C++ -*-

//=============================================================================
/**
 *  @file   IOR_Parser.h
 *
 *  $Id$
 *
 *  @author Carlos O'Ryan (coryan@cs.wustl.edu)
 */
//=============================================================================


#ifndef TAO_IOR_PARSER_H
#define TAO_IOR_PARSER_H

#include /**/ "ace/pre.h"
#include "ace/Service_Object.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

#include "tao/SystemException.h"

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

namespace CORBA
{
  class Object;
  typedef Object *Object_ptr;

  class ORB;
  typedef ORB *ORB_ptr;
}

/**
 * @class TAO_IOR_Parser
 *
 * @brief Defines the interface for the pluggable IOR parser components
 *
 * The ORB is able to dynamically load the list of IOR formats it
 * understands.  That allow us to integrate formats such as
 * corbaname:, http: or ftp: only when required.
 * This class provides a uniform interface for all the IOR parsers
 */
class TAO_Export TAO_IOR_Parser : public ACE_Service_Object
{
public:
  /// The destructor
  virtual ~TAO_IOR_Parser (void);

  /// Return 1 if @a ior_string starts with a prefix known to this IOR
  /// parser
  virtual int match_prefix (const char *ior_string) const = 0;

  /**
   * Parse the @a ior argument and return an object reference.
   * The call may raise the standard system exceptions (NO_MEMORY,
   * INV_OBJREF, etc.)
   */
  virtual CORBA::Object_ptr parse_string (const char *ior,
                                          CORBA::ORB_ptr orb
                                          ACE_ENV_ARG_DECL)
    ACE_THROW_SPEC ((CORBA::SystemException)) = 0;
};

TAO_END_VERSIONED_NAMESPACE_DECL

#include /**/ "ace/post.h"
#endif /* TAO_IOR_PARSER_H */