12 #ifndef EnvisatAsarRecord_h 13 #define EnvisatAsarRecord_h 87 int nb_octets =
sizeof(T);
90 buffer = (
char* )malloc(nb_octets);
91 res = (
char* )malloc(nb_octets);
93 memcpy(buffer,&value,nb_octets);
95 for (
int i=0; i<nb_octets/2; i++) {
96 res[i] = buffer[nb_octets-1-i];
97 res[nb_octets-1-i] = buffer[i];
99 memcpy(&value,res,nb_octets);
virtual ~EnvisatAsarRecord()
Destructor.
std::string get_mnemonic()
Returns the mnemonic of the record.
virtual EnvisatAsarRecord * Clone()=0
This function is able to create a new instance of the class initialised with the data of the calling ...
void SwitchEndian(T &value)
This function switches the LSB value and the MSB value of the parameter.
OSSIM_DLL ossimByteOrder byteOrder()
virtual void Read(std::istream &is)=0
Reads the class data from a stream.
std::basic_istream< char > istream
Base class for char input streams.
virtual EnvisatAsarRecord * Instanciate()=0
This function is able to create a new instance of the class.
virtual void Write(std::ostream &os)=0
Writes the class to a stream.
This class is the base class of all the Envisat ASAR record classes.
std::basic_ostream< char > ostream
Base class for char output streams.
EnvisatAsarRecord(std::string mnemonic)
Constructor.