Commit 4995b6a3 authored by thomas.forbriger's avatar thomas.forbriger Committed by thomas.forbriger
Browse files

new functions

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 1617
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent f867bd86
# this is <Makefile>
# ----------------------------------------------------------------------------
# $Id: Makefile,v 1.9 2004-02-10 21:15:23 tforb Exp $
# $Id: Makefile,v 1.10 2005-01-17 14:48:09 tforb Exp $
#
# Copyright (c) 2003 by Thomas Forbriger (BFO Schiltach)
#
......@@ -49,7 +49,7 @@ clean: ;
# ------------
LIBSRC=sffxx.cc wid2compare.cc wid2inrange.cc wid2isample.cc \
wid2lastsample.cc sffistream.cc sffostream.cc
wid2lastsample.cc sffistream.cc sffostream.cc srcesynref.cc
INCSRC=sffxx.h sffostream.h sffistream.h
-include $(patsubst %.cc,%.d,$(LIBSRC))
......
......@@ -3,7 +3,7 @@
*
* ----------------------------------------------------------------------------
*
* $Id: sffxx.h,v 1.19 2004-12-23 11:35:40 tforb Exp $
* $Id: sffxx.h,v 1.20 2005-01-17 14:48:10 tforb Exp $
* \author Thomas Forbriger
* \date 21/12/2003
*
......@@ -30,7 +30,7 @@
#define TF_SFFXX_H_VERSION \
"TF_SFFXX_H V1.3"
#define TF_SFFXX_H_CVSID \
"$Id: sffxx.h,v 1.19 2004-12-23 11:35:40 tforb Exp $"
"$Id: sffxx.h,v 1.20 2005-01-17 14:48:10 tforb Exp $"
#include<string>
#include<cmath>
......@@ -462,15 +462,25 @@ namespace sff {
// functions
// ---------
//! return time of last sample in waveform
libtime::TAbsoluteTime wid2lastsample(const WID2& wid2);
//! return time of next first sample for contiguous data
libtime::TAbsoluteTime wid2nextdate(const WID2& wid2);
//! return index for sample at given date
long int wid2isample(const WID2& wid2,
const libtime::TAbsoluteTime& idate);
//! return time for sample at given index
libtime::TAbsoluteTime wid2isample(const WID2& wid2,
const long int& i);
//! return time interval between idate and sample sample next to idate
libtime::TRelativeTime wid2isamplerest(const WID2& wid2,
const libtime::TAbsoluteTime& idate);
//! return ID string for synthtic time reference
std::string srce_reference_ID();
//! return synthetic time reference from nothing
sff::SRCE srce_reference();
} // namespace sff
#endif // TF_SFFXX_H_VERSION (includeguard)
......
/*! \file srcesynref.cc
* \brief provide time reference for synthetic waveforms (implementation)
*
* ----------------------------------------------------------------------------
*
* $Id: srcesynref.cc,v 1.1 2005-01-17 14:48:10 tforb Exp $
* \author Thomas Forbriger
* \date 17/01/2005
*
* provide time reference for synthetic waveforms (implementation)
*
* Copyright (c) 2005 by Thomas Forbriger (BFO Schiltach)
*
* REVISIONS and CHANGES
* - 17/01/2005 V1.0 Thomas Forbriger
*
* ============================================================================
*/
#define TF_SRCESYNREF_CC_VERSION \
"TF_SRCESYNREF_CC V1.0 "
#define TF_SRCESYNREF_CC_CVSID \
"$Id: srcesynref.cc,v 1.1 2005-01-17 14:48:10 tforb Exp $"
#include <sffxx.h>
namespace sff {
std::string srce_reference_ID()
{
return(std::string("synthetic.reference"));
} // std::string srce_reference_ID()
/*----------------------------------------------------------------------*/
sff::SRCE srce_reference()
{
sff::SRCE result;
result.type=srce_reference_ID();
result.date=libtime::now();
return(result);
} // sff::SRCE srce_reference()
}
/* ----- END OF srcesynref.cc ----- */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment