Isis 3 Programmer Reference
SpectralDefinitionFactory.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 
8 #include "SpectralDefinitionFactory.h"
9 #include "FileName.h"
10 #include "SpectralDefinition1D.h"
11 #include "SpectralDefinition2D.h"
12 
13 namespace Isis {
14  SpectralDefinition* SpectralDefinitionFactory::NewSpectralDefinition(FileName smileDefFilename){
15  //csvs will be output definitions, others will (hopefully) be input defs
16  //TODO: make "smarter" (actually open file & read extension)
17  if (smileDefFilename.extension() == "csv"){
18  return new SpectralDefinition1D(smileDefFilename);
19  }
20  else {
21  return new SpectralDefinition2D(smileDefFilename);
22  }
23  }
24 }
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16