Go Back   ZeroC Forums > Bug Reports

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
  #1 (permalink)  
Old 07-08-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
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)
Reply With Quote
  #2 (permalink)  
Old 07-08-2008
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,055
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.
Reply With Quote
  #3 (permalink)  
Old 07-09-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
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;
}
Reply With Quote
  #4 (permalink)  
Old 07-09-2008
matthew's Avatar
matthew matthew is offline
ZeroC Staff
 
Name: Matthew Newhook
Organization: ZeroC, Inc.
Project: Internet Communications Engine
 
Join Date: Feb 2003
Location: NL, Canada
Posts: 1,055
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.
Reply With Quote
  #5 (permalink)  
Old 07-09-2008
Andrew Andrew is offline
Registered User
 
Name: Andrea Nicotra
Organization: tvblob
Project: tvblob blobbox
 
Join Date: Jan 2008
Posts: 17
thanks a lot
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error C1189: #error : WINDOWS.H already included delloby Help Center 1 02-05-2006 02:58 AM
fatal error C1189: #error : "Ice for Visual C++ 6.0 requires STLport" richardma Help Center 4 01-13-2006 07:23 AM
Project : error PRJ0019: A tool returned an error code: "Performing Custom Build Step Falagard Help Center 6 04-11-2004 10:12 PM
link error: error LNK2001: unresolved external symbol __imp___assert gmueckl Help Center 2 09-03-2003 03:49 AM


All times are GMT -4. The time now is 08:35 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0
(c) 2008 ZeroC, Inc.