SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
SLObject.h
Go to the documentation of this file.
1
/**
2
* \file sl/SLObject.h
3
* \date July 2014
4
* \authors Marcus Hudritsch
5
* \copyright http://opensource.org/licenses/GPL-3.0
6
* \remarks Please use clangformat to format the code. See more code style on
7
* https://github.com/cpvrlab/SLProject4/wiki/SLProject-Coding-Style
8
*/
9
10
#ifndef SLREFOBJ_H
11
#define SLREFOBJ_H
12
13
#include <
SL.h
>
14
15
//-----------------------------------------------------------------------------
16
//! Base class for all other classes
17
/*!
18
The SLObject class serves as root3D class for other classes and provides for the
19
moment only a string with the name. It could be extended for object i/o
20
(serialization) or reference counting.
21
*/
22
class
SLObject
23
{
24
public
:
25
SLObject
(
const
SLstring
& Name =
""
,
26
const
SLstring
&
url
=
""
)
27
{
28
_name
= Name;
29
_url
=
url
;
30
}
31
virtual
~SLObject
() {}
32
33
// Setters
34
void
name
(
const
SLstring
& Name) {
_name
= Name; }
35
void
url
(
const
SLstring
&
url
) {
_url
=
url
; }
36
37
// Getters
38
const
SLstring
&
name
()
const
{
return
_name
; }
39
const
SLstring
&
url
()
const
{
return
_url
; }
40
41
protected
:
42
SLstring
_name
;
//!< name of an object
43
SLstring
_url
;
//!< uniform resource locator
44
};
45
//-----------------------------------------------------------------------------
46
#endif
SL.h
SLstring
string SLstring
Definition:
SL.h:158
SLObject
Base class for all other classes.
Definition:
SLObject.h:23
SLObject::_url
SLstring _url
uniform resource locator
Definition:
SLObject.h:43
SLObject::url
const SLstring & url() const
Definition:
SLObject.h:39
SLObject::SLObject
SLObject(const SLstring &Name="", const SLstring &url="")
Definition:
SLObject.h:25
SLObject::name
void name(const SLstring &Name)
Definition:
SLObject.h:34
SLObject::_name
SLstring _name
name of an object
Definition:
SLObject.h:42
SLObject::url
void url(const SLstring &url)
Definition:
SLObject.h:35
SLObject::name
const SLstring & name() const
Definition:
SLObject.h:38
SLObject::~SLObject
virtual ~SLObject()
Definition:
SLObject.h:31
modules
sl
source
SLObject.h
Generated by
1.9.1