R/gen-OtherMethod.R

Defines functions Median_acc Mean_acc method_acc so_OtherMethod_create_Median so_OtherMethod_set_Median so_OtherMethod_get_Median so_OtherMethod_create_Mean so_OtherMethod_set_Mean so_OtherMethod_get_Mean so_OtherMethod_set_method so_OtherMethod_get_method so_OtherMethod_unref so_OtherMethod_ref so_OtherMethod_free so_OtherMethod_copy so_OtherMethod_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_OtherMethod_new <- function() {
	obj = .Call("r_so_OtherMethod_new")
}

so_OtherMethod_copy <- function(self) {
	.Call("r_so_OtherMethod_copy", self)
}

so_OtherMethod_free <- function(self) {
	.Call("r_so_OtherMethod_free", self)
}

so_OtherMethod_ref <- function(self) {
	.Call("r_so_OtherMethod_ref", self)
}

so_OtherMethod_unref <- function(self) {
	.Call("r_so_OtherMethod_unref", self)
}

so_OtherMethod_get_method <- function(self) {
	.Call("r_so_OtherMethod_get_method", self)
}

so_OtherMethod_set_method <- function(self, value) {
	.Call("r_so_OtherMethod_set_method", self, value)
}

so_OtherMethod_get_Mean <- function(self) {
	.Call("r_so_OtherMethod_get_Mean", self)
}

so_OtherMethod_set_Mean <- function(self, value) {
	.Call("r_so_OtherMethod_set_Mean", self, value)
}

so_OtherMethod_create_Mean <- function(self) {
	.Call("r_so_OtherMethod_create_Mean", self)
}

so_OtherMethod_get_Median <- function(self) {
	.Call("r_so_OtherMethod_get_Median", self)
}

so_OtherMethod_set_Median <- function(self, value) {
	.Call("r_so_OtherMethod_set_Median", self, value)
}

so_OtherMethod_create_Median <- function(self) {
	.Call("r_so_OtherMethod_create_Median", self)
}

method_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			so_OtherMethod_get_method(.self$.cobj)
		} else {
			stopifnot(is.character(value), length(value) == 1)
			so_OtherMethod_set_method(.self$.cobj, value)
		}
	}
}

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

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

so_OtherMethod = setRefClass("so_OtherMethod",
	fields=list(
		method = method_acc,
		Mean = Mean_acc,
		Median = Median_acc,
		.cobj = "externalptr"
	),
	methods=list(
		copy = function() {
			copy = so_OtherMethod_copy(.self$.cobj)
			so_OtherMethod$new(cobj=copy)
		},
		initialize = function(cobj) {
			if (missing(cobj)) {
				.cobj <<- so_OtherMethod_new()
			} else {
				.cobj <<- cobj
			}
		},
		finalize = function() {
			so_OtherMethod_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.