CIAO VERSION: 0.5.9<br> TAO VERSION : 1.5.9<br> ACE VERSION : 5.5.9<br><br> HOST MACHINE and OPERATING SYSTEM:<br> If on Windows based OS's, which version of WINSOCK do you<br> use?: Core Duo, Debian linux kernel 2.4<br><br> TARGET MACHINE and OPERATING SYSTEM, if different from HOST:<br> COMPILER NAME AND VERSION (AND PATCHLEVEL):<br><br> THE $ACE_ROOT/ace/config.h FILE [if you use a link to a platform-<br> specific file, simply state which one]:#include "ace/config- <br>linux.h"<br><br> THE $ACE_ROOT/include/makeinclude/platform_macros.GNU FILE [if you<br> use a link to a platform-specific file, simply state which one<br> (unless this isn't used in this case, e.g., with Microsoft Visual
<br> C++)]:<br> no_hidden_visibility=1<br> include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU<br><br> CONTENTS OF $ACE_ROOT/bin/MakeProjectCreator/config/<br>default.features<br> (used by MPC when you generate your own makefiles): This file doesn't exist in the path. <br><br> AREA/CLASS/EXAMPLE AFFECTED:<br>[What example failed? What module failed to compile?] Help using Hash_Map_Manager_Ex<br><br> DOES THE PROBLEM AFFECT:<br> COMPILATION? No.<br> If so, what do your $ACE_ROOT/ace/config.h and <br> $ACE_ROOT/include/makeinclude/platform_macros.GNU contain?<br>
LINKING?<br> On Unix systems, did you run make realclean first?<br> EXECUTION? No.<br> OTHER (please specify)? Help using Hash_Map_Manager_Ex <br>[Please indicate whether ACE/TAO/CIAO, your application, or both are<br>affected.]<br><br> SYNOPSIS:<br>[Brief description of the problem] Help using Hash_Map_Manager_Ex<br><br> DESCRIPTION:<br>[Detailed description of problem. Don't just say "<blah> <br>doesn't work, here's a fix," explain what your program does<br>to get to the <blah> state. ]<br><br>Hi there,<br><br>I'm trying to use the Hash_Map_Manager class but I need some help from you.<br> <br>I have this structure declared in the IDL file:<br><br>struct StructMap {<br> string first_name;<br> string last_name;<br>}<br><br>I have a client file that uses this
structure in a Hash Map Manager:<br><br>typedef ACE_Hash_Map_Manager_Ex<ACE_CString, <br> Hello::StructMap,<br> ACE_Hash<ACE_CString>,<br> ACE_Equal_To<ACE_CString>,<br> ACE_Null_Mutex> Struct_Table; <br>Struct_Table struct_map;<br><br> Hello::StructMap
map;<br> map.first_name = "N1";<br> map.last_name = "L1";<br> struct_map.bind("1", map);<br> map.first_name = "N2"; <br> map.last_name = "L2";<br> struct_map.bind("2", map);<br><br> ACE_Hash_Map_Entry<ACE_CString,Hello::StructMap> *entry = 0;<br> struct_map.find("2", entry);<br><br> The code compiles fine but I don't know how to get the values from "entry". I tryied the following:<br><br>Hello::StructMap struct = entry->int_id_; <br>ACE_DEBUG((LM_DEBUG, "Connection %s!\n", struct.first_name ));<br><br>It didn't work I guess because the StructMap field have the type String_Manager and I can't show it using ACE_DEBUG. But I don't know how to extract a string from the "struct.first_name" value. I noticed also that there is another
method in the Hash_Map_Manager with the "find (const EXT_ID &ext_id, INT_ID &int_id) const" signature. Can I use it to get the content of the Hash Map like that: <br><br>Hello::StructMap smap;<br>struct_map(find, smap);<br><br>If I can do that, how do I access the string content of the "smap" members?<br><br>Thank you.<br><br>Gab.<br><br> REPEAT BY:<br>[What you did to get the error; include test program or session <br>transcript if at all possible. ]<br><br><br> SAMPLE FIX/WORKAROUND: <br>[If available ] <p> 
<hr size=1>Novo <a href="http://yahoo.com.br/oqueeuganhocomisso ">Yahoo! Cadê?</a> - Experimente uma nova busca.