/*========================================================================= Program: Visualization Toolkit Module: vtkTypedArray.txx ------------------------------------------------------------------------- Copyright 2008 Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. ------------------------------------------------------------------------- Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen All rights reserved. See Copyright.txt or http://www.kitware.com/Copyright.htm for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notice for more information. =========================================================================*/ #include "vtkVariantCast.h" #include "vtkVariantCreate.h" template void vtkTypedArray::PrintSelf(ostream &os, vtkIndent indent) { this->vtkTypedArray::Superclass::PrintSelf(os, indent); } template vtkVariant vtkTypedArray::GetVariantValue(const vtkArrayCoordinates& coordinates) { return vtkVariantCreate(this->GetValue(coordinates)); } template vtkVariant vtkTypedArray::GetVariantValueN(const SizeT n) { return vtkVariantCreate(this->GetValueN(n)); } template void vtkTypedArray::SetVariantValue(const vtkArrayCoordinates& coordinates, const vtkVariant& value) { this->SetValue(coordinates, vtkVariantCast(value)); } template void vtkTypedArray::SetVariantValueN(const SizeT n, const vtkVariant& value) { this->SetValueN(n, vtkVariantCast(value)); } template void vtkTypedArray::CopyValue(vtkArray* source, const vtkArrayCoordinates& source_coordinates, const vtkArrayCoordinates& target_coordinates) { if(!source->IsA(this->GetClassName())) { vtkWarningMacro("source and target array data types do not match"); return; } this->SetValue(target_coordinates, static_cast*>(source)->GetValue(source_coordinates)); } template void vtkTypedArray::CopyValue(vtkArray* source, const SizeT source_index, const vtkArrayCoordinates& target_coordinates) { if(!source->IsA(this->GetClassName())) { vtkWarningMacro("source and target array data types do not match"); return; } this->SetValue(target_coordinates, static_cast*>(source)->GetValueN(source_index)); } template void vtkTypedArray::CopyValue(vtkArray* source, const vtkArrayCoordinates& source_coordinates, const SizeT target_index) { if(!source->IsA(this->GetClassName())) { vtkWarningMacro("source and target array data types do not match"); return; } this->SetValueN(target_index, static_cast*>(source)->GetValue(source_coordinates)); }