(#541) Added some access methods to NRLib::LasWell to be used when exporting

This commit is contained in:
Pål Hagen 2015-10-15 16:11:03 +02:00
parent 958357b563
commit 33a32c9c1a
2 changed files with 26 additions and 0 deletions

View File

@ -544,6 +544,11 @@ void LasWell::WriteLasLine(std::ofstream & file,
file << mnemonic << " ." << units << " " << data << " : " << description << "\n"; file << mnemonic << " ." << units << " " << data << " : " << description << "\n";
} }
void LasWell::setDepthUnit(const std::string& depthUnit)
{
depth_unit_ = depthUnit;
};
std::string LasWell::depthUnit() const std::string LasWell::depthUnit() const
{ {
return depth_unit_; return depth_unit_;
@ -559,3 +564,18 @@ std::string LasWell::unitName(const std::string& logName) const
return ""; return "";
}; };
void NRLib::LasWell::setVersionInfo(const std::string& versionInfo)
{
version_ = versionInfo;
}
void NRLib::LasWell::setStartDepth(double startDepth)
{
start_depth_ = startDepth;
}
void NRLib::LasWell::setStopDepth(double stopDepth)
{
stop_depth_ = stopDepth;
}

View File

@ -53,9 +53,15 @@ public:
void WriteToFile(const std::string & filename, void WriteToFile(const std::string & filename,
const std::vector<std::string> & comment_header); const std::vector<std::string> & comment_header);
void setDepthUnit(const std::string& depthUnit);
std::string depthUnit() const; std::string depthUnit() const;
std::string unitName(const std::string& logName) const; std::string unitName(const std::string& logName) const;
void setVersionInfo(const std::string& logName);
void setStartDepth(double startDepth);
void setStopDepth(double stopDepth);
private: private:
void ReadHeader(const std::string & filename, void ReadHeader(const std::string & filename,
std::ifstream & fin, std::ifstream & fin,