#include "Stdafx.h"

extern "C" {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lkf5defs.h"
}

#include "LKFContext.h"
#include "LKFIntContext.h"

namespace lkfxdok {
	namespace c {

		LKFIntContext::LKFIntContext(LKFContextWithData ^context)
		{
			_context = context;
			_contextPtr = context->_contextPtr;
		}

		unsigned int LKFIntContext::GetIntAufenthaltCount() {
			return lkf_int_getAbtAnz((LKF_CONTEXT *)_contextPtr);
		}

		String ^LKFIntContext::GetIntAufenthaltField(unsigned int index, unsigned int field) {
			char buf[512];
			lkf_int_getIntAufenthaltField((LKF_CONTEXT *)_contextPtr, index, field, buf, 512);
			return gcnew String(buf);
		}

		String ^LKFIntContext::GetIntAufenthaltSAPSField(unsigned int index, unsigned int sapsIndex, unsigned int field) {
			char buf[512];
			lkf_int_getIntAufenthaltSAPSField((LKF_CONTEXT *)_contextPtr, index, sapsIndex, field, buf, 512);
			return gcnew String(buf);
		}

		unsigned int LKFIntContext::GetIntAufenthaltSAPSCount(unsigned int index) {
			return lkf_int_getIntAufenthaltSAPSCount((LKF_CONTEXT *)_contextPtr, index);
		}

		// lkf_int_getIntAufenthaltSAPSField
	}
}