|
#include <stdafx.h>
#include "InputFile.h"
namespace DESCombineLib {
/*
=====================================================================
=====================================================================
InputFile
=====================================================================
=====================================================================
*/
/*
=====================================================================
=====================================================================
*/
InputFile::InputFile()
: startTime( 0 )
, endTime( 0 )
{
}
/*
=====================================================================
=====================================================================
*/
InputFile::InputFile(
const std::wstring& mediaFilename,
double startTime,
double endTime
){
this->mediaFilename = mediaFilename;
this->startTime = startTime;
this->endTime = endTime;
}
/*
=====================================================================
=====================================================================
*/
InputFile::InputFile(
const std::wstring& mediaFilename,
const std::wstring& startTime,
const std::wstring& endTime
){
this->mediaFilename = mediaFilename;
std::wostringstream os;
os << startTime << L" " << endTime;
ASSERT( os.good() );
std::wistringstream is( os.str() );
ASSERT( is.good() );
double startTime2, endTime2;
is >> startTime2 >> endTime2;
ASSERT( is.good() );
ASSERT( startTime2 <= endTime2 );
this->startTime = startTime2 * UNITS;
this->endTime = endTime2 * UNITS;
}
/*
=====================================================================
=====================================================================
*/
InputFile& InputFile::operator=( const InputFile& src )
{
if( this != &src ) {
mediaFilename = src.mediaFilename;
startTime = src.startTime;
endTime = src.endTime;
}
return *this;
}
} // namespace DESCombineLib {
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.