ASL
0.1.7
Advanced Simulation Library
Toggle main menu visibility
Loading...
Searching...
No Matches
src
utilities
aslMATLABCasters.h
Go to the documentation of this file.
1
/*
2
* Advanced Simulation Library <http://asl.org.il>
3
*
4
* Copyright 2015 Avtech Scientific <http://avtechscientific.com>
5
*
6
*
7
* This file is part of Advanced Simulation Library (ASL).
8
*
9
* ASL is free software: you can redistribute it and/or modify it
10
* under the terms of the GNU Affero General Public License as
11
* published by the Free Software Foundation, version 3 of the License.
12
*
13
* ASL is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU Affero General Public License for more details.
17
*
18
* You should have received a copy of the GNU Affero General Public License
19
* along with ASL. If not, see <http://www.gnu.org/licenses/>.
20
*
21
*/
22
23
24
#ifndef ASLMATLABCASTERS_H
25
#define ASLMATLABCASTERS_H
26
27
#include <memory>
28
#include <string>
29
#include <vector>
30
35
36
namespace
acl
{
37
class
ElementBase
;
38
typedef
std::shared_ptr<ElementBase>
Element
;
39
}
40
41
struct
matvar_t;
42
namespace
asl
{
43
template
<
class
T>
class
AVec
;
44
}
45
47
namespace
matiocpp
{
48
class
Var
{
49
private
:
50
template
<
class
T> matvar_t* init(T *d,
const
asl::AVec<int>
& size,
const
std::string &name=
""
);
51
public
:
52
matvar_t*
var
;
53
bool
freeArray
;
54
inline
Var
(matvar_t* v,
bool
freeArr=
false
):
var
(v){}
55
template
<
class
T>
Var
(std::vector<T> & d,
const
std::string &name=
""
);
56
template
<
class
T>
Var
(T *d,
unsigned
int
size,
const
std::string &name=
""
,
bool
freeArr=
true
);
57
template
<
class
T>
Var
(T *d,
const
asl::AVec<int>
& size,
const
std::string &name=
""
,
bool
freeArr=
true
);
58
// Var(T *matiocpp, const asl::AVec<int> & size, const std::string &name=""); ///!!!
59
~Var
();
60
};
61
}
62
63
namespace
asl
{
64
class
Block;
65
class
AbstractData;
66
class
Probe;
67
70
typedef
std::shared_ptr<matiocpp::Var>
SPMatVar
;
71
72
SPMatVar
castMATLABCellArray
(
acl::Element
source,
const
std::string &name=
""
);
73
SPMatVar
castMATLABCellArray
(
acl::Element
source,
const
AVec<int>
& size,
const
std::string &name=
""
);
74
SPMatVar
castMATLABCellArray
(
const
AbstractData
& d,
const
std::vector<std::string> &names=
75
std::vector<std::string>(0));
76
SPMatVar
castMATLABCellArray
(
Probe
& p,
unsigned
int
component,
const
std::string &name=
""
);
78
}
//namespace acl
79
80
81
#endif
// ASLMATLABCASTERS_H
acl::ElementBase
Definition
aclElementBase.h:50
asl::AVec
Definition
aslVectorsDynamicLength.h:40
asl::AbstractData
Definition
aslDataWrapper.h:53
asl::Probe
Collects point values from the input data.
Definition
aslProbe.h:54
matiocpp::Var::freeArray
bool freeArray
Definition
aslMATLABCasters.h:53
matiocpp::Var::~Var
~Var()
matiocpp::Var::Var
Var(T *d, unsigned int size, const std::string &name="", bool freeArr=true)
matiocpp::Var::Var
Var(T *d, const asl::AVec< int > &size, const std::string &name="", bool freeArr=true)
matiocpp::Var::Var
Var(matvar_t *v, bool freeArr=false)
Definition
aslMATLABCasters.h:54
matiocpp::Var::Var
Var(std::vector< T > &d, const std::string &name="")
matiocpp::Var::var
matvar_t * var
Definition
aslMATLABCasters.h:52
asl::SPMatVar
std::shared_ptr< matiocpp::Var > SPMatVar
Definition
aslMATLABCasters.h:70
asl::castMATLABCellArray
SPMatVar castMATLABCellArray(acl::Element source, const std::string &name="")
acl
Advanced Computational Language.
Definition
acl.h:41
acl::Element
std::shared_ptr< ElementBase > Element
Definition
acl.h:49
asl
Advanced Simulation Library.
Definition
aslDataInc.h:31
matiocpp
the matio c++ wrapper
Definition
aslMATLABCasters.h:47
Generated by
1.17.0