R/gen-ToolSettings.R

Defines functions File_acc so_ToolSettings_create_File so_ToolSettings_remove_File so_ToolSettings_add_File so_ToolSettings_get_number_of_File so_ToolSettings_get_File so_ToolSettings_unref so_ToolSettings_ref so_ToolSettings_free so_ToolSettings_copy so_ToolSettings_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_ToolSettings_new <- function() {
	obj = .Call("r_so_ToolSettings_new")
}

so_ToolSettings_copy <- function(self) {
	.Call("r_so_ToolSettings_copy", self)
}

so_ToolSettings_free <- function(self) {
	.Call("r_so_ToolSettings_free", self)
}

so_ToolSettings_ref <- function(self) {
	.Call("r_so_ToolSettings_ref", self)
}

so_ToolSettings_unref <- function(self) {
	.Call("r_so_ToolSettings_unref", self)
}

so_ToolSettings_get_File <- function(self, number) {
	.Call("r_so_ToolSettings_get_File", self, number)
}

so_ToolSettings_get_number_of_File <- function(self) {
	.Call("r_so_ToolSettings_get_number_of_File", self)
}
so_ToolSettings_add_File <- function(self, value) {
	.Call("r_so_ToolSettings_add_File", self, value)
}
so_ToolSettings_remove_File <- function(self, index) {
	.Call("r_so_ToolSettings_remove_File", self, index)
}

so_ToolSettings_create_File <- function(self) {
	.Call("r_so_ToolSettings_create_File", self)
}

File_acc <- function(value)
{
	if (!isnull(.self$.cobj)) {
		if (missing(value)) {
			n = so_ToolSettings_get_number_of_File(.self$.cobj)
			if (n > 0) {
				a = list()
				for (i in seq.int(1, n)) {
					child = so_ToolSettings_get_File(.self$.cobj, i - 1L)
					a[[i]] = so_ExternalFile$new(cobj=child)
					so_ExternalFile_ref(child)
				}
				return(a)
			}
		} else {
		}
	}
}

so_ToolSettings = setRefClass("so_ToolSettings",
	fields=list(
		File = File_acc,
		.cobj = "externalptr"
	),
	methods=list(
		copy = function() {
			copy = so_ToolSettings_copy(.self$.cobj)
			so_ToolSettings$new(cobj=copy)
		},
		initialize = function(cobj) {
			if (missing(cobj)) {
				.cobj <<- so_ToolSettings_new()
			} else {
				.cobj <<- cobj
			}
		},
		finalize = function() {
			so_ToolSettings_unref(.self$.cobj)
		},
		add_File = function(value) {
			so_ToolSettings_add_File(.self$.cobj, value$.cobj)
			invisible(so_ExternalFile_ref(value$.cobj))
		},
		remove_File = function(value, index) {
			invisible(so_ToolSettings_remove_File(.self$.cobj, index))
		}
	)
)

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.