Changeset 4024 in Sophya


Ignore:
Timestamp:
Oct 2, 2011, 10:46:06 PM (13 years ago)
Author:
cmv
Message:

write chat strign into bintable, cmv 02/10/2011

Location:
trunk/SophyaExt/FitsIOServer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/fabtwriter.cc

    r4023 r4024  
    398398  \param tform : fits tform definition ("1I","1J","1E","1J",...)
    399399         (can be automatically set as "datatype"
    400           if BINARY_TBL and tform="" or tform=NULL)
     400          if BINARY_TBL and tform="" or tform=NULL).
     401         character string can be written using the tform=":nA" with "n" the number of characters
    401402  \param tunit : fits tunit definition (optional)
    402403  \param datatype : TBYTE TSHORT TLONG (TINT32BIT) TLONGLONG TFLOAT TDOUBLE
     
    549550*/
    550551
     552/*! Write a character string to FITS file */
     553void FitsABTWriter::Write(int col,LONGLONG row,const char* val)
     554{
     555  if(FirstTime) createtbl();
     556  int sta=0;
     557  if(fits_write_col(FitsPtr,TSTRING,col+1,row+1,1,1,&val,&sta))
     558    printerrorwrite("char*",col,row,sta);
     559}
     560
    551561/*! Write signed char (1 Byte) data to FITS file (see below) */
    552562void FitsABTWriter::Write(int col,LONGLONG row,long nfirstel,int_1 val)
  • trunk/SophyaExt/FitsIOServer/fabtwriter.h

    r4023 r4024  
    104104     {return addcol(label,tform,tunit,datatype);}
    105105
     106  void Write(int col,LONGLONG row,const char* val);
     107  inline void Write(int col,LONGLONG row,string val)
     108              {Write(col,row,val.c_str());}
     109
    106110  void Write(int col,LONGLONG row,long nfirstel,int_1 val);
    107111  void Write(int col,LONGLONG row,long nfirstel,uint_1 val);
Note: See TracChangeset for help on using the changeset viewer.