FACT++  1.0
void ofits::Key::Out ( std::ostream &  fout)
inline

Definition at line 215 of file ofits.h.

References Checksum::add(), Compile(), Checksum::reset(), and str.

216  {
217  if (!changed)
218  return;
219 
220  std::string str = Compile();
221  str.insert(str.end(), 80-str.size(), ' ');
222 
223  if (offset==0)
224  offset = fout.tellp();
225 
226  //cout << "Write[" << offset << "]: " << key << "/" << value << endl;
227 
228  fout.seekp(offset);
229  fout << str;
230 
231  checksum.reset();
232  checksum.add(str.c_str(), 80);
233 
234  changed = false;
235  }
Checksum checksum
Definition: ofits.h:213
char str[80]
Definition: test_client.c:7
bool changed
Definition: ofits.h:45
void reset()
Definition: checksum.h:15
std::string Compile()
Definition: ofits.h:189
off_t offset
Definition: ofits.h:43
bool add(const char *buf, size_t len, bool big_endian=true)
Definition: checksum.h:49

+ Here is the call graph for this function: