// Aqsis
// Copyright (c) 1997 - 2001, Paul C. Gregory
//
// Contact: pgregory@aqsis.com
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// General Public License for more details.
//
// You should have received a copy of the GNU General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/**
 * Copyright (C) 2006-2007  NTT DATA CORPORATION
 * 
 * Version: 1.0.0 2007/04/01
 *  
 */
package net.cellcomputing.himawari.library;

import net.cellcomputing.himawari.accessory.STLVector;

/**
 * CqParameter系の親クラス
 *
 * @author NTT DATA Corporation
 */
public abstract strictfp class CqParameterTyped<T,SLT> extends CqParameter {
	 protected Class<? extends T> TClass; 	//Generics T
	 protected Class<? extends SLT> SLTClass;	//Generics SLT
	 
	/**
	 * コンストラクタ
	 * 親クラスのコンストラクタを呼び出す
	 * 
	 * @param strName パラメタ名
	 * @param Count
	 * @param TClass Generics Sのclass
	 * @param SLTClass Generics SLTのclass
	 */
	public CqParameterTyped( final String strName, int Count,Class<? extends T> TClass,Class<? extends SLT> SLTClass){
		super(strName,Count);
		this.TClass = TClass;
		this.SLTClass =SLTClass;
	}
	
	/**
	 * コンストラクタ
	 * 親のコンストラクタを呼び出す
	 * 
	 * @param strName パラメタ名
	 * @param TClass Generics Tのclass
	 * @param SLTClass Generics SLTのclass
	 * 
	 */
	public CqParameterTyped(final String strName,Class<? extends T> TClass,Class<? extends SLT> SLTClass){
		this(strName,1,TClass,SLTClass);
	}
	/**
	 * コピーコンストラクタ
	 * 親のコンストラクタを呼び出す
	 * 
	 * @param From コピー元
	 */
	public CqParameterTyped(final CqParameterTyped<T, SLT> From){
		super(From);
		TClass =From.TClass;
		SLTClass = From.SLTClass;
	}
	/**
	 * デストラクタ 
	 */
	public void destruct(){
		super.destruct();
	}
	/** Get a pointer to the value (presumes uniform).
	 * 値のポインタを取得する(単一と仮定する)
	 */
	public abstract Object[]	pValue();
	/* Get a pointer to the value (presumes uniform).
	 * constが付いているだけだったので削除
	 */
//	abstract T	pValue();
	/** Get a pointer to the value at the specified index, if uniform index is ignored.
	 * indexが無視される場合,
	 * indexで指定された値のポインタを取得する。
	 * 
	 */
	public abstract Object[]	pValue(final int Index );
	
	public abstract T	pValue_get(final int Index ,final int arrayIndex);
	/* Get a pointer to the value at the specified index, if uniform index is ignored.
	 */
//	abstract T	pValue( const TqInt Index );
	
	public void SetValue( CqParameter pFrom, int idxTarget, int idxSource )
	{
//		assert( pFrom.Type() == Type() );
//		
//		CqParameterTyped<T, SLT> pFromTyped = (CqParameterTyped<T, SLT>)( pFrom );
//		T  temp = pValue( idxTarget );
//		temp = pFromTyped.pValue( idxSource );
		//pValue(idxTarget) = pFromTyped.pvalue
	}
	

}
