cisst-saw
Loading...
Searching...
No Matches
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
14This software is provided "as is" under an open source license, with
15no warranty. The complete license can be found in license.txt and
16http://www.cisst.org/cisst/license.txt.
17
18--- end cisst license ---
19*/
20
21
26
27#ifndef _mtsStateArrayBase_h
28#define _mtsStateArrayBase_h
29
31
43protected:
45 inline mtsStateArrayBase(void){};
46
49
50public:
51 typedef size_t index_type;
52 typedef size_t size_type;
53
55 inline virtual ~mtsStateArrayBase(void) {};
56
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
Base class for class services.
Definition cmnClassServicesBase.h:46
Base class for data object in cisstMultiTask.
Definition mtsGenericObject.h:52
virtual bool Set(index_type index, const mtsGenericObject &data)=0
virtual const mtsGenericObject & operator[](index_type index) const =0
size_t index_type
Definition mtsStateArrayBase.h:51
virtual void Copy(index_type indexTo, index_type indexFrom)=0
size_t size_type
Definition mtsStateArrayBase.h:52
virtual mtsGenericObject & operator[](index_type index)=0
virtual mtsStateArrayBase * Create(const mtsGenericObject *objectExample, size_type size)=0
virtual bool SetDataSize(const size_t size)=0
mtsStateArrayBase(void)
Definition mtsStateArrayBase.h:45
bool SetSize(const size_t size)
Definition mtsStateArrayBase.h:77
const cmnClassServicesBase * DataClassServices
Definition mtsStateArrayBase.h:48
virtual bool Get(index_type index, mtsGenericObject &data) const =0
virtual ~mtsStateArrayBase(void)
Definition mtsStateArrayBase.h:55
Defines mtsGenericObject.
size_type size(void) const
Definition vctDynamicConstMatrixBase.h:228