That was too easy.  I'll try to find something more challenging next time.
Thanks!
Andrew

On Oct 24, 2012, at 9:15 PM, K. John Wu wrote:

> Hi, Andrew,
> 
> Please include dictionary.h in fb.cc.  The type ibis::dictionary is
> defined in util.h, which is likely included by your code through
> ibis.h.  However, ibis::dictionary is only completely defined in
> dictionary.h.
> 
> Looks like you might be trying to do something with an ibis::category
> object.  If this is the case, you need to include category.h
> explicitly (which will in turn include dictionary.h).
> 
> John
> 
> 
> On 10/24/12 4:53 PM, Olson, Andrew wrote:
>> I'm trying to use a column's dictionary to convert category values from 
>> uint32_t back to strings.  I'm getting these errors when compiling:
>> 
>> ../fb.cc:55:14: error: member access into incomplete type 'const 
>> ibis::dictionary'
>> ../fb.cc:56:53: error: type 'const ibis::dictionary' does not provide a 
>> subscript operator
>> 
>> 
>> Here's the block of code where this happens:
>> 
>>                      case ibis::UINT:
>>                      {
>>                              uint32_t *buf = new uint32_t[nr];
>>                              ierr = tbl.getColumnAsUInts(nms[j], buf);
>>                              ibis::column *col = parts[0]->getColumn(nms[j]);
>>                              const ibis::dictionary *dic = 
>> col->getDictionary();
>>                              if (dic == 0)
>>                                      for (size_t i = 0; i < nr; ++ i)
>>                                              
>> column->Set(i,Number::New(buf[i]));
>>                              else
>>                                      for (size_t i = 0; i < nr; ++ i) {
>>                                              if (dic->size() >= buf[i]) {
>>                                                      
>> column->Set(i,String::New((*dic)[buf[i]]));
>>                                              }
>>                                      }
>>                              break;
>>                      }
>> 
>> 
>> Is this another example of some functions that have not been used externally 
>> (not in libfastbit)?
>> 
>> Andrew
>> _______________________________________________
>> FastBit-users mailing list
>> [email protected]
>> https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users
>> 

_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to