Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
1d1137bf
Commit
1d1137bf
authored
Feb 14, 2013
by
Houtan Bastani
Browse files
reporting (WIP)
parent
77dbf06a
Changes
13
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@objArray/addObj.m
View file @
1d1137bf
...
...
@@ -29,4 +29,5 @@ if nargin == 2
oa
.
objs
{
end
+
1
}
=
varargin
{
1
};
elseif
nargin
==
3
oa
.
objs
{
varargin
{
2
}}
=
varargin
{
1
};
end
end
\ No newline at end of file
matlab/reports/@objArray/getObjs.m
View file @
1d1137bf
...
...
@@ -22,6 +22,7 @@ switch nargin
case
1
e
=
oa
.
objs
;
case
2
assert
(
isnumeric
(
varargin
{
1
}));
e
=
oa
.
objs
{
varargin
{
1
}};
otherwise
error
(
'objArray getObjs: invalid number of arguments'
);
...
...
matlab/reports/@page/addSection.m
View file @
1d1137bf
...
...
@@ -30,20 +30,9 @@ function p = addSection(p, varargin)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert
(
nargin
>=
1
&&
nargin
<=
3
,
[
'incorrect number of arguments passed '
...
'to addSection'
]);
assert
(
isa
(
p
,
'page'
),
'First argument must be a page object'
);
if
nargin
>
1
assert
(
isa
(
varargin
{
1
},
'section'
),
[
'Optional 2nd arg to addSection must be a '
...
'Section'
]);
if
nargin
>
2
assert
(
isnumeric
(
varargin
{
2
}),
[
'Optional 3rd arg to addSection must be '
...
'an index'
]);
end
end
if
nargin
==
1
p
.
sections
=
p
.
sections
.
addSection
(
section
()
);
p
.
sections
=
p
.
sections
.
addSection
();
elseif
nargin
==
2
||
nargin
==
3
p
.
sections
=
p
.
sections
.
addSection
(
varargin
{:});
end
...
...
matlab/reports/@page/display.m
0 → 100644
View file @
1d1137bf
function
display
(
o
)
%function display(o)
% Display a Page object
%
% INPUTS
% none
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare 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 General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
name
=
'report.page'
;
disp
(
' '
);
disp
([
name
'.sections = '
]);
disp
(
' '
);
disp
(
o
.
sections
());
end
\ No newline at end of file
matlab/reports/@page/subsasgn.m
View file @
1d1137bf
...
...
@@ -35,7 +35,7 @@ switch S.type
B
{
index
}
=
V
;
case
'.'
switch
S
.
subs
case
fields
(
A
)
case
field
name
s
(
A
)
B
.
(
S
.
subs
)
=
V
;
otherwise
error
([
'field '
S
.
subs
'does not exist in the page class'
])
...
...
matlab/reports/@pages/display.m
0 → 100644
View file @
1d1137bf
function
display
(
o
)
%function display(o)
% Display a Pages object
%
% INPUTS
% none
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare 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 General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
name
=
'report.pages'
;
disp
(
' '
);
disp
([
name
' = '
]);
disp
(
' '
);
disp
(
getPages
(
o
));
end
\ No newline at end of file
matlab/reports/@report/addPage.m
View file @
1d1137bf
...
...
@@ -43,7 +43,7 @@ if nargin > 1
end
if
nargin
==
1
r
.
pages
=
r
.
pages
.
addPage
(
page
()
);
r
.
pages
=
r
.
pages
.
addPage
();
elseif
nargin
==
2
||
nargin
==
3
r
.
pages
=
r
.
pages
.
addPage
(
varargin
{:});
end
...
...
matlab/reports/@report/display.m
View file @
1d1137bf
function
display
(
r
)
%function display(
r
)
function
display
(
o
)
%function display(
o
)
% Display a Report object
%
% INPUTS
...
...
@@ -28,20 +28,21 @@ function display(r)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
name
=
'report'
;
disp
(
' '
);
disp
([
input
name
(
1
)
'.title = '
]);
disp
([
name
'.title = '
]);
disp
(
' '
);
disp
([
'
''
'
r
.
title
'
''
'
]);
disp
([
'
''
'
o
.
title
'
''
'
]);
disp
(
' '
)
disp
([
input
name
(
1
)
'.orientation = '
]);
disp
([
name
'.orientation = '
]);
disp
(
' '
);
disp
([
'
''
'
r
.
orientation
'
''
'
]);
disp
([
'
''
'
o
.
orientation
'
''
'
]);
disp
(
' '
)
disp
([
input
name
(
1
)
'.numPages() = '
]);
disp
([
name
'.numPages() = '
]);
disp
(
' '
);
disp
([
' '
num2str
(
numPages
(
r
))]);
disp
([
' '
num2str
(
numPages
(
o
))]);
disp
(
' '
);
disp
([
input
name
(
1
)
'.pages = '
]);
disp
([
name
'.pages = '
]);
disp
(
' '
);
disp
(
r
.
pages
.
getPages
());
disp
(
o
.
pages
.
getPages
());
end
\ No newline at end of file
matlab/reports/@report/subsasgn.m
View file @
1d1137bf
...
...
@@ -35,7 +35,7 @@ switch S.type
B
.
pages
(
index
)
=
V
;
case
'.'
switch
S
.
subs
case
fields
(
A
)
case
field
name
s
(
A
)
B
.
(
S
.
subs
)
=
V
;
otherwise
error
([
'field '
S
.
subs
'does not exist in the report class'
]);
...
...
matlab/reports/@report/subsref.m
View file @
1d1137bf
...
...
@@ -34,9 +34,7 @@ switch S(1).type
error
([
'Report Class: unknown field or method: '
S
(
1
)
.
subs
]);
end
case
'()'
index
=
S
(
1
)
.
subs
{:};
assert
(
isnumeric
(
index
));
A
=
A
(
index
);
A
=
A
.
pages
.
getPages
(
S
(
1
)
.
subs
{:});
case
'{}'
error
([
'Report Class: '
S
(
1
)
.
type
' indexing not supported.'
]);
otherwise
...
...
matlab/reports/@section/display.m
0 → 100644
View file @
1d1137bf
function
display
(
o
)
%function display(o)
% Display a Section object
%
% INPUTS
% none
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare 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 General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
name
=
'report.page.section'
;
disp
(
' '
);
disp
([
name
'.x = '
]);
end
\ No newline at end of file
matlab/reports/@sections/addSection.m
View file @
1d1137bf
...
...
@@ -19,6 +19,11 @@ function ss = addSection(ss, varargin)
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert
(
nargin
>=
1
&&
nargin
<=
3
)
if
nargin
>
1
assert
(
isa
(
varargin
{
1
},
'section'
),
[
'Optional 2nd arg to addSection '
...
'must be a Section'
]);
end
if
nargin
==
1
ss
.
objArray
=
ss
.
objArray
.
addObj
(
section
());
else
...
...
matlab/reports/@sections/display.m
0 → 100644
View file @
1d1137bf
function
display
(
o
)
%function display(o)
% Display a Sections object
%
% INPUTS
% none
%
% OUTPUTS
% none
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare 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 General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
name
=
'reports.page'
;
disp
(
' '
);
disp
([
name
'.sections = '
]);
disp
(
' '
);
disp
(
getSections
(
o
));
end
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment