R/gen-Estimation.R

Defines functions TargetToolMessages_acc OFMeasures_acc Predictions_acc Residuals_acc PrecisionIndividualEstimates_acc IndividualEstimates_acc PrecisionPopulationEstimates_acc PopulationEstimates_acc so_Estimation_create_TargetToolMessages so_Estimation_set_TargetToolMessages so_Estimation_get_TargetToolMessages so_Estimation_create_OFMeasures so_Estimation_set_OFMeasures so_Estimation_get_OFMeasures so_Estimation_create_Predictions so_Estimation_set_Predictions so_Estimation_get_Predictions so_Estimation_create_Residuals so_Estimation_set_Residuals so_Estimation_get_Residuals so_Estimation_create_PrecisionIndividualEstimates so_Estimation_set_PrecisionIndividualEstimates so_Estimation_get_PrecisionIndividualEstimates so_Estimation_create_IndividualEstimates so_Estimation_set_IndividualEstimates so_Estimation_get_IndividualEstimates so_Estimation_create_PrecisionPopulationEstimates so_Estimation_set_PrecisionPopulationEstimates so_Estimation_get_PrecisionPopulationEstimates so_Estimation_create_PopulationEstimates so_Estimation_set_PopulationEstimates so_Estimation_get_PopulationEstimates so_Estimation_unref so_Estimation_ref so_Estimation_free so_Estimation_copy so_Estimation_new

# libsoc - Library to handle standardised output files
# Copyright (C) 2015 Rikard Nordgren
# 
# This file was autogenerated and should not be edited
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# his 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
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, see <http://www.gnu.org/licenses/>.

so_Estimation_new <- function() {
	obj = .Call("r_so_Estimation_new")
}

so_Estimation_copy <- function(self) {
	.Call("r_so_Estimation_copy", self)
}

so_Estimation_free <- function(self) {
	.Call("r_so_Estimation_free", self)
}

so_Estimation_ref <- function(self) {
	.Call("r_so_Estimation_ref", self)
}

so_Estimation_unref <- function(self) {
	.Call("r_so_Estimation_unref", self)
}

so_Estimation_get_PopulationEstimates <- function(self) {
	.Call("r_so_Estimation_get_PopulationEstimates", self)
}

so_Estimation_set_PopulationEstimates <- function(self, value) {
	.Call("r_so_Estimation_set_PopulationEstimates", self, value)
}

so_Estimation_create_PopulationEstimates <- function(self) {
	.Call("r_so_Estimation_create_PopulationEstimates", self)
}

so_Estimation_get_PrecisionPopulationEstimates <- function(self) {
	.Call("r_so_Estimation_get_PrecisionPopulationEstimates", self)
}

so_Estimation_set_PrecisionPopulationEstimates <- function(self, value) {
	.Call("r_so_Estimation_set_PrecisionPopulationEstimates", self, value)
}

so_Estimation_create_PrecisionPopulationEstimates <- function(self) {
	.Call("r_so_Estimation_create_PrecisionPopulationEstimates", self)
}

so_Estimation_get_IndividualEstimates <- function(self) {
	.Call("r_so_Estimation_get_IndividualEstimates", self)
}

so_Estimation_set_IndividualEstimates <- function(self, value) {
	.Call("r_so_Estimation_set_IndividualEstimates", self, value)
}

so_Estimation_create_IndividualEstimates <- function(self) {
	.Call("r_so_Estimation_create_IndividualEstimates", self)
}

so_Estimation_get_PrecisionIndividualEstimates <- function(self) {
	.Call("r_so_Estimation_get_PrecisionIndividualEstimates", self)
}

so_Estimation_set_PrecisionIndividualEstimates <- function(self, value) {
	.Call("r_so_Estimation_set_PrecisionIndividualEstimates", self, value)
}

so_Estimation_create_PrecisionIndividualEstimates <- function(self) {
	.Call("r_so_Estimation_create_PrecisionIndividualEstimates", self)
}

so_Estimation_get_Residuals <- function(self) {
	.Call("r_so_Estimation_get_Residuals", self)
}

so_Estimation_set_Residuals <- function(self, value) {
	.Call("r_so_Estimation_set_Residuals", self, value)
}

so_Estimation_create_Residuals <- function(self) {
	.Call("r_so_Estimation_create_Residuals", self)
}

so_Estimation_get_Predictions <- function(self) {
	.Call("r_so_Estimation_get_Predictions", self)
}

so_Estimation_set_Predictions <- function(self, value) {
	.Call("r_so_Estimation_set_Predictions", self, value)
}

so_Estimation_create_Predictions <- function(self) {
	.Call("r_so_Estimation_create_Predictions", self)
}

so_Estimation_get_OFMeasures <- function(self) {
	.Call("r_so_Estimation_get_OFMeasures", self)
}

so_Estimation_set_OFMeasures <- function(self, value) {
	.Call("r_so_Estimation_set_OFMeasures", self, value)
}

so_Estimation_create_OFMeasures <- function(self) {
	.Call("r_so_Estimation_create_OFMeasures", self)
}

so_Estimation_get_TargetToolMessages <- function(self) {
	.Call("r_so_Estimation_get_TargetToolMessages", self)
}

so_Estimation_set_TargetToolMessages <- function(self, value) {
	.Call("r_so_Estimation_set_TargetToolMessages", self, value)
}

so_Estimation_create_TargetToolMessages <- function(self) {
	.Call("r_so_Estimation_create_TargetToolMessages", self)
}

PopulationEstimates_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_PopulationEstimates(.self$.cobj)
			if (!isnull(child)) {
				so_PopulationEstimates_ref(child)
				so_PopulationEstimates$new(cobj=child)
			}
		} else {
			if (!is(value, "so_PopulationEstimates")) {
				stop("object must be of type 'so_PopulationEstimates'")
			}
			so_Estimation_set_PopulationEstimates(.self$.cobj, value$.cobj)
			so_PopulationEstimates_ref(value$.cobj)
		}
	}
}

PrecisionPopulationEstimates_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_PrecisionPopulationEstimates(.self$.cobj)
			if (!isnull(child)) {
				so_PrecisionPopulationEstimates_ref(child)
				so_PrecisionPopulationEstimates$new(cobj=child)
			}
		} else {
			if (!is(value, "so_PrecisionPopulationEstimates")) {
				stop("object must be of type 'so_PrecisionPopulationEstimates'")
			}
			so_Estimation_set_PrecisionPopulationEstimates(.self$.cobj, value$.cobj)
			so_PrecisionPopulationEstimates_ref(value$.cobj)
		}
	}
}

IndividualEstimates_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_IndividualEstimates(.self$.cobj)
			if (!isnull(child)) {
				so_IndividualEstimates_ref(child)
				so_IndividualEstimates$new(cobj=child)
			}
		} else {
			if (!is(value, "so_IndividualEstimates")) {
				stop("object must be of type 'so_IndividualEstimates'")
			}
			so_Estimation_set_IndividualEstimates(.self$.cobj, value$.cobj)
			so_IndividualEstimates_ref(value$.cobj)
		}
	}
}

PrecisionIndividualEstimates_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_PrecisionIndividualEstimates(.self$.cobj)
			if (!isnull(child)) {
				so_PrecisionIndividualEstimates_ref(child)
				so_PrecisionIndividualEstimates$new(cobj=child)
			}
		} else {
			if (!is(value, "so_PrecisionIndividualEstimates")) {
				stop("object must be of type 'so_PrecisionIndividualEstimates'")
			}
			so_Estimation_set_PrecisionIndividualEstimates(.self$.cobj, value$.cobj)
			so_PrecisionIndividualEstimates_ref(value$.cobj)
		}
	}
}

Residuals_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_Residuals(.self$.cobj)
			if (!isnull(child)) {
				so_Residuals_ref(child)
				so_Residuals$new(cobj=child)
			}
		} else {
			if (!is(value, "so_Residuals")) {
				stop("object must be of type 'so_Residuals'")
			}
			so_Estimation_set_Residuals(.self$.cobj, value$.cobj)
			so_Residuals_ref(value$.cobj)
		}
	}
}

Predictions_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_Estimation_get_Predictions(.self$.cobj)
		} else {
			if (!is(value, "data.frame")) {
				stop("object must be of type 'data.frame'")
			}
			so_Estimation_set_Predictions(.self$.cobj, value)
		}
	}
}

OFMeasures_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_OFMeasures(.self$.cobj)
			if (!isnull(child)) {
				so_OFMeasures_ref(child)
				so_OFMeasures$new(cobj=child)
			}
		} else {
			if (!is(value, "so_OFMeasures")) {
				stop("object must be of type 'so_OFMeasures'")
			}
			so_Estimation_set_OFMeasures(.self$.cobj, value$.cobj)
			so_OFMeasures_ref(value$.cobj)
		}
	}
}

TargetToolMessages_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			child = so_Estimation_get_TargetToolMessages(.self$.cobj)
			if (!isnull(child)) {
				so_TargetToolMessages_ref(child)
				so_TargetToolMessages$new(cobj=child)
			}
		} else {
			if (!is(value, "so_TargetToolMessages")) {
				stop("object must be of type 'so_TargetToolMessages'")
			}
			so_Estimation_set_TargetToolMessages(.self$.cobj, value$.cobj)
			so_TargetToolMessages_ref(value$.cobj)
		}
	}
}

so_Estimation = setRefClass("so_Estimation",
	fields=list(
		PopulationEstimates = PopulationEstimates_acc,
		PrecisionPopulationEstimates = PrecisionPopulationEstimates_acc,
		IndividualEstimates = IndividualEstimates_acc,
		PrecisionIndividualEstimates = PrecisionIndividualEstimates_acc,
		Residuals = Residuals_acc,
		Predictions = Predictions_acc,
		OFMeasures = OFMeasures_acc,
		TargetToolMessages = TargetToolMessages_acc,
		.cobj = "externalptr"
	),
	methods=list(
		copy = function() {
			copy = so_Estimation_copy(.self$.cobj)
			so_Estimation$new(cobj=copy)
		},
		initialize = function(cobj) {
			if (missing(cobj)) {
				.cobj <<- so_Estimation_new()
			} else {
				.cobj <<- cobj
			}
		},
		finalize = function() {
			so_Estimation_unref(.self$.cobj)
		}
	)
)

Try the libsoc package in your browser

Any scripts or data that you put into this service are public.

libsoc documentation built on Feb. 3, 2022, 5:07 p.m.