Changeset 662:4dd7b4faeee0


Ignore:
Timestamp:
05/18/08 22:17:27 (2 years ago)
Author:
Howard Butler <hobu.inc@…>
Branch:
default
Convert:
svn:1766ff46-f334-0410-ab20-d63176f87757/trunk@729
Message:

take in a reference to a pointer for LASVLR_GetData, I don't know if I like this though

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/liblas/capi/liblas.h

    r654 r662  
    758758LAS_DLL LASError LASHeader_SetProj4(LASHeaderH hHeader, const char* value); 
    759759 
     760/** Returns the VLR record for the given index.  Use LASHeader_GetRecordsCount to  
     761 *  determine the number of VLR records available on the header. 
     762 *  @param hHeader the LASHeaderH instance 
     763 *  @param i the index starting from 0 of the VLR to fetch 
     764 *  @return LASVLRH instance that models the Variable Length Record 
     765*/ 
     766LAS_DLL LASVLRH LASHeader_GetVLR(const LASHeaderH hHeader, uint32_t i); 
     767 
     768/** Deletes a VLR record from the header for the given index. 
     769 *  @param hHeader the LASHeaderH instance 
     770 *  @param index the index starting from 0 of the VLR to delete 
     771 *  @return LASErrorEnum 
     772*/ 
     773LAS_DLL LASError LASHeader_DeleteVLR(LASHeaderH hHeader, uint32_t index); 
     774 
     775/** Adds a VLR record to the header.  
     776 *  @param hHeader the LASHeaderH instance 
     777 *  @param hVLR the VLR to add to the header 
     778 *  @return LASErrorEnum 
     779*/ 
     780LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR); 
     781 
    760782/****************************************************************************/ 
    761783/* Writer Operations                                                        */ 
     
    842864LAS_DLL char* LASGuid_AsString(LASGuidH hId); 
    843865 
    844 /** Returns the VLR record for the given index.  Use LASHeader_GetRecordsCount to  
    845  *  determine the number of VLR records available on the header. 
    846  *  @param hHeader the LASHeaderH instance 
    847  *  @param i the index starting from 0 of the VLR to fetch 
    848  *  @return LASVLRH instance that models the Variable Length Record 
    849 */ 
    850 LAS_DLL LASVLRH LASHeader_GetVLR(const LASHeaderH hHeader, uint32_t i); 
    851  
    852 /** Deletes a VLR record from the header for the given index. 
    853  *  @param hHeader the LASHeaderH instance 
    854  *  @param index the index starting from 0 of the VLR to delete 
    855  *  @return LASErrorEnum 
    856 */ 
    857 LAS_DLL LASError LASHeader_DeleteVLR(LASHeaderH hHeader, uint32_t index); 
    858  
    859 /** Adds a VLR record to the header.  
    860  *  @param hHeader the LASHeaderH instance 
    861  *  @param hVLR the VLR to add to the header 
    862  *  @return LASErrorEnum 
    863 */ 
    864 LAS_DLL LASError LASHeader_AddVLR(LASHeaderH hHeader, const LASVLRH hVLR); 
     866/****************************************************************************/ 
     867/* VLR Operations                                                           */ 
     868/****************************************************************************/ 
    865869 
    866870/** Creates a new VLR record 
     
    947951 *  @return LASErrorEnum 
    948952*/ 
    949 LAS_DLL LASError LASVLR_GetData(const LASVLRH hVLR, uint8_t* data, int* length); 
     953LAS_DLL LASError LASVLR_GetData(const LASVLRH hVLR, uint8_t** data, int* length); 
    950954 
    951955LAS_C_END 
  • src/las_c_api.cpp

    r654 r662  
    14311431} 
    14321432 
    1433 LAS_DLL LASErrorEnum LASVLR_GetData(const LASVLRH hVLR, liblas::uint8_t* data, int* length) { 
     1433LAS_DLL LASErrorEnum LASVLR_GetData(const LASVLRH hVLR, liblas::uint8_t** data, int* length) { 
    14341434     
    14351435    VALIDATE_POINTER1(hVLR, "LASVLR_GetData", LE_Failure); 
     
    14371437    try { 
    14381438        std::vector<liblas::uint8_t> *d = new std::vector<liblas::uint8_t>(((LASVLR*) hVLR)->GetData()); 
    1439         *data = d->front(); 
     1439        *data = &(d->front()); 
     1440        //data = &(d[0]) 
    14401441        *length = static_cast<int>(d->size()); 
     1442        printf("GetData length %d\n", *length); 
    14411443    } 
    14421444    catch (std::exception const& e) { 
Note: See TracChangeset for help on using the changeset viewer.