WRAP_CLASS("itk::PolyLineParametricPath")

  SET(MANAGED_TYPE_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedParametricPath_TYPE.cxx.in)
  SET(MANAGED_WRAPPER_TEMPLATE ${MANAGED_ITK_SOURCE_COMMON_PATH}/itkManagedParametricPath_WRAPPER.cxx.in)

  FOREACH(d ${WRAP_ITK_DIMS})
    WRAP_TEMPLATE("${d}" "${d}")
  ENDFOREACH(d)

  BEGIN_MANAGED_METHOD("AddVertex")
    SET(MANAGED_METHOD_SUMMARY         "Add a vertex (and a connecting line segment to the previous vertex). Adding a vertex has the additional effect of extending the domain of the PolyLineParametricPath by 1.0 (each pair of consecutive verticies is seperated by one unit of input).")
    SET(MANAGED_METHOD_RETURN_TYPE     "void")
    SET(MANAGED_METHOD_PARAMS          "itkContinuousIndex^ vertex")
    SET(MANAGED_METHOD_TYPE_BODY       "m_PointerToNative->AddVertex( itk::ManagedTypes::ToNativeContinuousIndex<NativeType::PathDimension>(vertex) );")
    SET(MANAGED_METHOD_WRAPPER_BODY    "iInstance->AddVertex( vertex );")
  END_MANAGED_METHOD()

  SET(body "")
  SET(body "${body}// Create the array\n")
  SET(body "${body}\t\tunsigned long num = m_PointerToNative->GetVertexList()->Size();\n")
  SET(body "${body}\t\tarray<itkContinuousIndex^>^ result = gcnew array<itkContinuousIndex^>( num );\n")
  SET(body "${body}\t\t\n")
  SET(body "${body}\t\t// Step through unmanaged array\n")
  SET(body "${body}\t\tNativeType::VertexListPointer vertices = (NativeType::VertexListType*)this->m_PointerToNative->GetVertexList( );\n")
  SET(body "${body}\t\tfor (unsigned int i=0; i<num; i++)\n")
  SET(body "${body}\t\t{\n")
  SET(body "${body}\t\t\tresult[i] = gcnew itkContinuousIndex(NativeType::PathDimension);\n")
  SET(body "${body}\t\t\tfor( unsigned int dim=0; dim<NativeType::PathDimension; dim++)\n")
  SET(body "${body}\t\t\t\tresult[i][dim] = vertices->GetElement(i)[dim];\n")
  SET(body "${body}\t\t}\n")
  SET(body "${body}\t\treturn result;\n")

  BEGIN_MANAGED_METHOD("GetVertexList")
    SET(MANAGED_METHOD_SUMMARY         "Returns a managed copy of the list of the vertices.")
    SET(MANAGED_METHOD_RETURN_TYPE     "array<itkContinuousIndex^>^")
    SET(MANAGED_METHOD_PARAMS          "void")
    SET(MANAGED_METHOD_TYPE_BODY       ${body})
    SET(MANAGED_METHOD_WRAPPER_BODY    "return iInstance->GetVertexList( );")
  END_MANAGED_METHOD()

END_WRAP_CLASS()
