18 #ifndef __otbObjectListSource_txx
19 #define __otbObjectListSource_txx
31 template <
class TOutputList>
37 typename TOutputList::Pointer output
38 =
static_cast<TOutputList*
>(this->MakeOutput(0).GetPointer());
39 this->Superclass::SetNumberOfRequiredOutputs(1);
40 this->Superclass::SetNthOutput(0, output.GetPointer());
47 template<
class TOutputList>
58 template <
class TOutputList>
63 if (this->GetNumberOfOutputs() < 1)
68 return static_cast<TOutputList*
>
69 (this->Superclass::GetOutput(0));
75 template <
class TOutputList>
80 return static_cast<TOutputList*
>
81 (this->Superclass::GetOutput(idx));
87 template<
class TOutputList>
92 this->GraftNthOutput(0, graft);
98 template<
class TOutputList>
103 if (idx >= this->GetNumberOfOutputs())
105 itkExceptionMacro(<<
"Requested to graft output " << idx <<
106 " but this filter only has " << this->GetNumberOfOutputs() <<
" Outputs.");
111 itkExceptionMacro(<<
"Requested to graft output that is a NULL pointer");
117 output->
Graft(graft);
122 template <
class TOutputList>
130 for (
unsigned int i = 0; i < this->GetNumberOfOutputs(); ++i)
132 outputPtr = this->GetOutput(i);
140 template <
class TOutputList>
145 itkExceptionMacro(
"subclass should override this method!!!");
151 template <
class TOutputList>
156 Superclass::PrintSelf(os, indent);