contrib/oxl/mvl/FileNameGeneratorBase.cxx
Go to the documentation of this file.
00001 // This is oxl/mvl/FileNameGeneratorBase.cxx
00002 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00003 #pragma implementation
00004 #endif
00005 //:
00006 // \file
00007 
00008 #include "FileNameGeneratorBase.h"
00009 
00010 #include <vnl/vnl_identity.h>
00011 
00012 //: Construct by copying the supplied indexer 
00013 FileNameGeneratorBase::FileNameGeneratorBase()
00014 {
00015   indexer_ = vnl_identity<int>().Copy();
00016 }
00017 
00018 //: Construct by copying the supplied indexer 
00019 FileNameGeneratorBase::FileNameGeneratorBase(const FileNameGeneratorBase::Indexer& indexer)
00020 {
00021   indexer_ = indexer.Copy();
00022 }
00023 
00024 FileNameGeneratorBase::FileNameGeneratorBase(const FileNameGeneratorBase& that)
00025 {
00026   indexer_ = that.indexer_->Copy();
00027 }
00028 
00029 FileNameGeneratorBase& FileNameGeneratorBase::operator=(const FileNameGeneratorBase& that)
00030 {
00031   delete indexer_;
00032   indexer_ = that.indexer_->Copy();
00033   return *this;
00034 }
00035 
00036 int FileNameGeneratorBase::get_real_index(int index) const
00037 {
00038   return indexer_->f(index);
00039 }