cisst-saw
Toggle main menu visibility
Loading...
Searching...
No Matches
tmp
cisst-saw
cisst
cisstMultiTask
mtsStateArrayBase.h
Go to the documentation of this file.
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4
/*
5
6
Author(s): Ankur Kapoor
7
Created on: 2004-04-30
8
9
(C) Copyright 2004-2008 Johns Hopkins University (JHU), All Rights
10
Reserved.
11
12
--- begin cisst license - do not edit ---
13
14
This software is provided "as is" under an open source license, with
15
no warranty. The complete license can be found in license.txt and
16
http://www.cisst.org/cisst/license.txt.
17
18
--- end cisst license ---
19
*/
20
21
26
27
#ifndef _mtsStateArrayBase_h
28
#define _mtsStateArrayBase_h
29
30
#include <
cisstMultiTask/mtsGenericObject.h
>
31
42
class
mtsStateArrayBase
{
43
protected
:
45
inline
mtsStateArrayBase
(
void
){};
46
48
const
cmnClassServicesBase
*
DataClassServices
;
49
50
public
:
51
typedef
size_t
index_type
;
52
typedef
size_t
size_type
;
53
55
inline
virtual
~mtsStateArrayBase
(
void
) {};
56
58
virtual
mtsGenericObject
&
operator[]
(
index_type
index) = 0;
59
61
virtual
const
mtsGenericObject
&
operator[]
(
index_type
index)
const
= 0;
62
64
virtual
mtsStateArrayBase
*
Create
(
const
mtsGenericObject
* objectExample,
size_type
size
) = 0;
65
67
virtual
void
Copy
(
index_type
indexTo,
index_type
indexFrom) = 0;
68
70
virtual
bool
Get
(
index_type
index,
mtsGenericObject
& data)
const
= 0;
71
73
virtual
bool
Set
(
index_type
index,
const
mtsGenericObject
& data) = 0;
74
75
virtual
bool
SetDataSize
(
const
size_t
size
) = 0;
76
77
bool
SetSize
(
const
size_t
size
){
78
return
SetDataSize
(
size
);
79
}
80
81
};
82
83
84
#endif
// _mtsStateArrayBase_h
85
cmnClassServicesBase
Base class for class services.
Definition
cmnClassServicesBase.h:46
mtsGenericObject
Base class for data object in cisstMultiTask.
Definition
mtsGenericObject.h:52
mtsStateArrayBase::Set
virtual bool Set(index_type index, const mtsGenericObject &data)=0
mtsStateArrayBase::operator[]
virtual const mtsGenericObject & operator[](index_type index) const =0
mtsStateArrayBase::index_type
size_t index_type
Definition
mtsStateArrayBase.h:51
mtsStateArrayBase::Copy
virtual void Copy(index_type indexTo, index_type indexFrom)=0
mtsStateArrayBase::size_type
size_t size_type
Definition
mtsStateArrayBase.h:52
mtsStateArrayBase::operator[]
virtual mtsGenericObject & operator[](index_type index)=0
mtsStateArrayBase::Create
virtual mtsStateArrayBase * Create(const mtsGenericObject *objectExample, size_type size)=0
mtsStateArrayBase::SetDataSize
virtual bool SetDataSize(const size_t size)=0
mtsStateArrayBase::mtsStateArrayBase
mtsStateArrayBase(void)
Definition
mtsStateArrayBase.h:45
mtsStateArrayBase::SetSize
bool SetSize(const size_t size)
Definition
mtsStateArrayBase.h:77
mtsStateArrayBase::DataClassServices
const cmnClassServicesBase * DataClassServices
Definition
mtsStateArrayBase.h:48
mtsStateArrayBase::Get
virtual bool Get(index_type index, mtsGenericObject &data) const =0
mtsStateArrayBase::~mtsStateArrayBase
virtual ~mtsStateArrayBase(void)
Definition
mtsStateArrayBase.h:55
mtsGenericObject.h
Defines mtsGenericObject.
size
size_type size(void) const
Definition
vctDynamicConstMatrixBase.h:228
Generated by
1.18.0