Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Niflib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Grant Kim
Niflib
Commits
663dc499
Commit
663dc499
authored
17 years ago
by
Shon Ferguson
Browse files
Options
Downloads
Patches
Plain Diff
Moving array template to nif_basic_types so that NIF_IO won't need to be exposed.
parent
25189fa9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/NIF_IO.h
+1
-18
1 addition, 18 deletions
include/NIF_IO.h
include/nif_basic_types.h
+19
-0
19 additions, 0 deletions
include/nif_basic_types.h
with
20 additions
and
18 deletions
include/NIF_IO.h
+
1
−
18
View file @
663dc499
...
@@ -19,24 +19,7 @@ using namespace std;
...
@@ -19,24 +19,7 @@ using namespace std;
#define NULL 0
#define NULL 0
#endif
#endif
/*! Used to enable static arrays to be members of vectors */
#define MAXARRAYDUMP 20
template
<
int
size
,
class
T
>
struct
array
{
array
()
{
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
data
[
i
]
=
T
();
}
}
~
array
()
{}
T
&
operator
[](
unsigned
int
index
)
{
return
data
[
index
];
}
const
T
&
operator
[](
unsigned
int
index
)
const
{
return
data
[
index
];
}
private
:
T
data
[
size
];
};
//--IO Functions--//
//--IO Functions--//
...
...
This diff is collapsed.
Click to expand it.
include/nif_basic_types.h
+
19
−
0
View file @
663dc499
...
@@ -61,6 +61,25 @@ struct NifInfo {
...
@@ -61,6 +61,25 @@ struct NifInfo {
string
exportInfo2
;
string
exportInfo2
;
};
};
/*! Used to enable static arrays to be members of vectors */
template
<
int
size
,
class
T
>
struct
array
{
array
()
{
for
(
size_t
i
=
0
;
i
<
size
;
++
i
)
{
data
[
i
]
=
T
();
}
}
~
array
()
{}
T
&
operator
[](
unsigned
int
index
)
{
return
data
[
index
];
}
const
T
&
operator
[](
unsigned
int
index
)
const
{
return
data
[
index
];
}
private
:
T
data
[
size
];
};
//TODO: This is temporary to make it compile. Should eventually be adjusted to display 1's and 0's insted of as an int.
//TODO: This is temporary to make it compile. Should eventually be adjusted to display 1's and 0's insted of as an int.
typedef
unsigned
short
Flags
;
typedef
unsigned
short
Flags
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment