Changeset 1513


Ignore:
Timestamp:
2000-09-07T10:00:15+12:00 (24 years ago)
Author:
davidb
Message:

To correctly handle images using Corba the interface had to be changed
to additionaly store httpdomain and httpprefix. Extra code was also
added to text_t.

Location:
branches/corba/gsdl/lib
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/corba/gsdl/lib/corbaiface.h

    r1074 r1513  
    138138  corbatext_tmap format;
    139139  corbatext_tmap building;
     140  corbatext_t httpdomain;
     141  corbatext_t httpprefix;
    140142  corbatext_t receptionist;
    141143};
     
    476478    static bool _narrow_helper2( CORBA::Object_ptr obj );
    477479
    478     virtual CORBA::Boolean init() = 0;
     480    virtual CORBA::Boolean initialise() = 0;
    479481    virtual void configure( const corbatext_t& key, const corbatext_tarray& cfgline ) = 0;
    480482    virtual void collectionList( corbatext_tarray& collist ) = 0;
     
    500502  public:
    501503    virtual ~corbaiface_stub();
    502     CORBA::Boolean init();
     504    CORBA::Boolean initialise();
    503505    void configure( const corbatext_t& key, const corbatext_tarray& cfgline );
    504506    void collectionList( corbatext_tarray& collist );
  • branches/corba/gsdl/lib/corbaiface.idl

    r1074 r1513  
    5757  corbatext_tmap    format;
    5858  corbatext_tmap    building;
     59  corbatext_t       httpdomain ;    // Added 27/07/2000
     60  corbatext_t       httpprefix;     // Added 27/07/2000
    5961  corbatext_t       receptionist;
    6062};
     
    197199interface corbaiface
    198200{
    199   boolean   _init();
     201  boolean   initialise();
    200202  void      configure(in corbatext_t key, in corbatext_tarray cfgline);
    201203  void      collectionList(inout corbatext_tarray collist);
  • branches/corba/gsdl/lib/corbaiface.mpp

    r1074 r1513  
    292292  format = ((corbaColInfoResponse&)_s).format;
    293293  building = ((corbaColInfoResponse&)_s).building;
     294  httpdomain = ((corbaColInfoResponse&)_s).httpdomain;
     295  httpprefix = ((corbaColInfoResponse&)_s).httpprefix;
    294296  receptionist = ((corbaColInfoResponse&)_s).receptionist;
    295297}
     
    314316  format = ((corbaColInfoResponse&)_s).format;
    315317  building = ((corbaColInfoResponse&)_s).building;
     318  httpdomain = ((corbaColInfoResponse&)_s).httpdomain;
     319  httpprefix = ((corbaColInfoResponse&)_s).httpprefix;
    316320  receptionist = ((corbaColInfoResponse&)_s).receptionist;
    317321  return *this;
     
    361365    _marshaller_corbatext_tmap->demarshal( dc, &((_MICO_T*)v)->format ) &&
    362366    _marshaller_corbatext_tmap->demarshal( dc, &((_MICO_T*)v)->building ) &&
     367    _marshaller_corbatext_t->demarshal( dc, &((_MICO_T*)v)->httpdomain ) &&
     368    _marshaller_corbatext_t->demarshal( dc, &((_MICO_T*)v)->httpprefix ) &&
    363369    _marshaller_corbatext_t->demarshal( dc, &((_MICO_T*)v)->receptionist ) &&
    364370    dc.struct_end();
     
    380386  _marshaller_corbatext_tmap->marshal( ec, &((_MICO_T*)v)->format );
    381387  _marshaller_corbatext_tmap->marshal( ec, &((_MICO_T*)v)->building );
     388  _marshaller_corbatext_t->marshal( ec, &((_MICO_T*)v)->httpdomain );
     389  _marshaller_corbatext_t->marshal( ec, &((_MICO_T*)v)->httpprefix );
    382390  _marshaller_corbatext_t->marshal( ec, &((_MICO_T*)v)->receptionist );
    383391  ec.struct_end();
     
    14261434}
    14271435
    1428 CORBA::Boolean corbaiface_stub::init()
     1436CORBA::Boolean corbaiface_stub::initialise()
    14291437{
    14301438  CORBA::Boolean _res;
    14311439  CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
    14321440
    1433   CORBA::StaticRequest __req( this, "init" );
     1441  CORBA::StaticRequest __req( this, "initialise" );
    14341442  __req.set_result( &__res );
    14351443
     
    21252133      break;
    21262134    case 11:
     2135      if( strcmp( _req->op_name(), "initialise" ) == 0 ) {
     2136        CORBA::Boolean _res;
     2137        CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
     2138        _req->set_result( &__res );
     2139
     2140        if( !_req->read_args() )
     2141          return true;
     2142
     2143        _res = initialise();
     2144        _req->write_results();
     2145        return true;
     2146      }
    21272147      if( strcmp( _req->op_name(), "getFilterInfo" ) == 0 ) {
    21282148        corbatext_t collection;
     
    22022222
    22032223        getDocument( collection, request, response, error );
    2204         _req->write_results();
    2205         return true;
    2206       }
    2207       break;
    2208     case 16:
    2209       if( strcmp( _req->op_name(), "init" ) == 0 ) {
    2210         CORBA::Boolean _res;
    2211         CORBA::StaticAny __res( CORBA::_stc_boolean, &_res );
    2212         _req->set_result( &__res );
    2213 
    2214         if( !_req->read_args() )
    2215           return true;
    2216 
    2217         _res = init();
    22182224        _req->write_results();
    22192225        return true;
  • branches/corba/gsdl/lib/text_t.cpp

    r1073 r1513  
    2828/*
    2929   $Log$
     30   Revision 1.15.2.3  2000/09/06 22:00:14  davidb
     31
     32   To correctly handle images using Corba the interface had to be changed
     33   to additionaly store httpdomain and httpprefix.  Extra code was also
     34   added to text_t.
     35
    3036   Revision 1.15.2.2  2000/04/05 10:19:38  syeates
    3137   added automatic conversion to allow text_t's to be <<'ed to ostreams
     
    337343
    338344
    339 // general functions which work on text_ts
     345// general functions which work on text_t's
    340346
    341347// find a character within a range
     
    360366    }
    361367  return first;
     368}
     369
     370text_t::iterator findword (text_t::iterator first, text_t::iterator last,
     371               const text_t& word)
     372{
     373  text_t::const_iterator word_begin = word.begin();
     374  text_t::const_iterator word_end = word.end();
     375
     376  while (first != last)
     377    {
     378      text_t::iterator char_match = first;
     379      text_t::const_iterator word_here = word_begin;
     380      while (word_here!=word_end)
     381    {
     382      if (*char_match != *word_here)
     383        {
     384          break;
     385        }
     386      char_match++;
     387      word_here++;
     388    }
     389      if (word_here==word_end)
     390    {
     391      return first;
     392    }
     393      first++;
     394    }
     395  return last; // get to here only if there is no match
    362396}
    363397
  • branches/corba/gsdl/lib/text_t.h

    r1073 r1513  
    217217
    218218
    219 // general functions which work on text_ts
     219// general functions which work on text_t's
    220220
    221221// find a character within a range
     
    224224text_t::iterator findchar (text_t::iterator first, text_t::iterator last,
    225225               unsigned short c);
     226
     227text_t::iterator findword (text_t::iterator first, text_t::iterator last,
     228               const text_t& word);
    226229
    227230// get a string up to the next delimiter (which is skipped)
Note: See TracChangeset for help on using the changeset viewer.