Home Bug Reports

error ServiceInstanceDescriptor

AndrewAndrew Member Andrea NicotraOrganization: PersonalProject: Backend for IPTV
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)

Comments

  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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.
  • AndrewAndrew Member Andrea NicotraOrganization: PersonalProject: Backend for IPTV
    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 :
    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;
    }
    
  • matthewmatthew NL, CanadaMember Matthew NewhookOrganization: ZeroC, Inc.Project: Internet Communications Engine ✭✭✭
    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.
  • AndrewAndrew Member Andrea NicotraOrganization: PersonalProject: Backend for IPTV
    thanks a lot
Sign In or Register to comment.