Results 1 to 5 of 5

Thread: error ServiceInstanceDescriptor

  1. #1
    Andrew is offline Registered User
    Name: Andrea Nicotra
    Organization: Personal
    Project: Backend for IPTV
    Join Date
    Jan 2008
    Posts
    29

    error ServiceInstanceDescriptor

    when i try to get the value of template from that struct ServiceInstanceDescriptor I have an error :

    error: ‘template’ (as a disambiguator) is only allowed within templates

    I use kubuntu 8.04 and gcc version 4.2.3 (Ubuntu 4.2.3-2ubuntu7)

  2. #2
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    Sorry, but I don't really understand your question. Can you be more specific please? XML descriptors, and code (if appropriate) would help in diagnosing your issue.

  3. #3
    Andrew is offline Registered User
    Name: Andrea Nicotra
    Organization: Personal
    Project: Backend for IPTV
    Join Date
    Jan 2008
    Posts
    29
    when I try to read data member "template" from "ServiceInstanceDescriptor" struct in cpp, I recive an error like that:

    error: ‘template’ (as a disambiguator) is only allowed within templates

    so I think that is usefull change the data member name.

    the data member of "ServiceInstanceDescriptor" are :

    string template;
    StringStringDict parameterValues;
    ServiceDescriptor descriptor;
    PropertySetDescriptor propertySet;

    for example :
    Code:
    IceGrid::IceBoxDescriptorPtr iceBox = IceGrid::IceBoxDescriptorPtr::dynamicCast( *ser );
    
    for (
           IceGrid::ServiceInstanceDescriptorSeq::iterator srv( iceBox->services.begin() ) ;
    	srv != iceBox->services.end() ;
    	srv++
    )
    {
    	std::string aux = srv->template;
    }

  4. #4
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    See 4.5.3 in the Ice manual. slice identifiers that are keywords in an implementation language (such as template in C++) are escaped during translation. For C++ _cpp_ is appended to the start of the identifier. Therefore, you should use _cpp_template, not template in your C++ code.

  5. #5
    Andrew is offline Registered User
    Name: Andrea Nicotra
    Organization: Personal
    Project: Backend for IPTV
    Join Date
    Jan 2008
    Posts
    29
    thanks a lot

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. error LNK2019 : unresolved symbol error
    By colorado in forum Help Center
    Replies: 3
    Last Post: 12-16-2010, 06:57 PM
  2. make test error! demo error!
    By zeronumber in forum Help Center
    Replies: 1
    Last Post: 12-16-2009, 04:36 AM
  3. Replies: 1
    Last Post: 02-05-2006, 01:58 AM
  4. Replies: 6
    Last Post: 04-11-2004, 09:12 PM
  5. Replies: 2
    Last Post: 09-03-2003, 02:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •