Text file writer for nearest neighbours results. More...
#include <NeighboursTextFileWriter.h>
Public Member Functions | |
NeighboursTextFileWriter (char const *aFileNameStr, bool aIsLarge=false) | |
Constructor. | |
virtual | ~NeighboursTextFileWriter () |
virtual void | open () |
Open file for writing. | |
virtual void | close () |
Close file. | |
virtual void | write (Object const *aMasterObjectPtr, Object const *aSlaveObjectPtr) |
Write an object pair row to the output text file. | |
Protected Attributes | |
FILE * | mFilePtr |
char const * | mFileNameStr |
bool | mIsLarge |
Private Member Functions | |
NeighboursTextFileWriter () | |
NeighboursTextFileWriter (NeighboursTextFileWriter const &aCopy) | |
NeighboursTextFileWriter & | operator= (NeighboursTextFileWriter const &aCopy) |
Text file writer for nearest neighbours results.
Creates comma-separated text file with one row for each matching pair, and one row for each reverse match, with columns: masterObjId, slaveObjId, distanceMins (the source separation in arcminutes)
Definition at line 23 of file NeighboursTextFileWriter.h.
NeighboursTextFileWriter::NeighboursTextFileWriter | ( | char const * | aFileNameStr, | |
bool | aIsLarge = false | |||
) |
Constructor.
aFileNameStr | Create output file with this name | |
aIsLarge | Will file be larger than 2 Gb? |
Definition at line 12 of file NeighboursTextFileWriter.cpp.
virtual NeighboursTextFileWriter::~NeighboursTextFileWriter | ( | ) | [inline, virtual] |
Definition at line 32 of file NeighboursTextFileWriter.h.
NeighboursTextFileWriter::NeighboursTextFileWriter | ( | ) | [private] |
NeighboursTextFileWriter::NeighboursTextFileWriter | ( | NeighboursTextFileWriter const & | aCopy | ) | [private] |
void NeighboursTextFileWriter::close | ( | ) | [virtual] |
Close file.
Reimplemented from ObjectPairWriter.
Definition at line 26 of file NeighboursTextFileWriter.cpp.
References FileUtil::close(), FileUtil::instance(), and mFilePtr.
void NeighboursTextFileWriter::open | ( | ) | [virtual] |
Open file for writing.
Reimplemented from ObjectPairWriter.
Definition at line 21 of file NeighboursTextFileWriter.cpp.
References FileUtil::instance(), mFileNameStr, mFilePtr, mIsLarge, and FileUtil::writeOpen().
NeighboursTextFileWriter& NeighboursTextFileWriter::operator= | ( | NeighboursTextFileWriter const & | aCopy | ) | [private] |
virtual void NeighboursTextFileWriter::write | ( | Object const * | aMasterObjectPtr, | |
Object const * | aSlaveObjectPtr | |||
) | [inline, virtual] |
Write an object pair row to the output text file.
aMasterObjectPtr | Datum Object for the first source in the pair | |
aSlaveObjectPtr | Datum Object for the second source in the pair |
Reimplemented from ObjectPairWriter.
Definition at line 44 of file NeighboursTextFileWriter.h.
References Object::gcDistanceMins(), Datum::getId(), and mFilePtr.
char const* NeighboursTextFileWriter::mFileNameStr [protected] |
Definition at line 61 of file NeighboursTextFileWriter.h.
Referenced by open().
FILE* NeighboursTextFileWriter::mFilePtr [protected] |
Definition at line 60 of file NeighboursTextFileWriter.h.
bool NeighboursTextFileWriter::mIsLarge [protected] |
Definition at line 62 of file NeighboursTextFileWriter.h.
Referenced by open().