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
6c52bb50
Commit
6c52bb50
authored
18 years ago
by
Amorilia
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup + fix in key IO code.
parent
17b4bdd0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
NIF_IO.h
+8
-43
8 additions, 43 deletions
NIF_IO.h
with
8 additions
and
43 deletions
NIF_IO.h
+
8
−
43
View file @
6c52bb50
...
@@ -382,9 +382,9 @@ void NifStream( Key<T> & key, istream& file, uint version, KeyType type ) {
...
@@ -382,9 +382,9 @@ void NifStream( Key<T> & key, istream& file, uint version, KeyType type ) {
}
}
template
<
class
T
>
template
<
class
T
>
void
NifStream
(
Key
<
T
>
&
key
,
istream
&
file
,
uint
version
,
u
int
type
)
{
void
NifStream
(
Key
<
T
>
&
key
,
istream
&
file
,
uint
version
,
int
type
)
{
NifStream
(
key
,
file
,
(
KeyType
)
type
);
NifStream
(
key
,
file
,
version
,
(
KeyType
)
type
);
}
;
}
template
<
class
T
>
template
<
class
T
>
void
NifStream
(
Key
<
T
>
const
&
key
,
ostream
&
file
,
uint
version
,
KeyType
type
)
{
void
NifStream
(
Key
<
T
>
const
&
key
,
ostream
&
file
,
uint
version
,
KeyType
type
)
{
...
@@ -410,6 +410,11 @@ void NifStream( Key<T> const & key, ostream& file, uint version, KeyType type )
...
@@ -410,6 +410,11 @@ void NifStream( Key<T> const & key, ostream& file, uint version, KeyType type )
}
}
}
}
template
<
class
T
>
void
NifStream
(
Key
<
T
>
const
&
key
,
ostream
&
file
,
uint
version
,
int
type
)
{
NifStream
(
key
,
file
,
version
,
(
KeyType
)
type
);
}
ostream
&
operator
<<
(
ostream
&
out
,
PixelLayout
const
&
val
);
ostream
&
operator
<<
(
ostream
&
out
,
PixelLayout
const
&
val
);
template
<
class
T
>
template
<
class
T
>
ostream
&
operator
<<
(
ostream
&
out
,
Key
<
T
>
const
&
val
)
{
ostream
&
operator
<<
(
ostream
&
out
,
Key
<
T
>
const
&
val
)
{
...
@@ -421,50 +426,10 @@ ostream & operator<<( ostream & out, Key<T> const & val ) {
...
@@ -421,50 +426,10 @@ ostream & operator<<( ostream & out, Key<T> const & val ) {
<<
"Continuity: "
<<
val
.
continuity
<<
endl
;
<<
"Continuity: "
<<
val
.
continuity
<<
endl
;
}
}
template
<
class
T
>
void
NifStream
(
Key
<
T
>
const
&
key
,
ostream
&
file
,
uint
version
,
uint
type
)
{
NifStream
(
key
,
file
,
(
KeyType
)
type
);
};
//Key<Quaternion>
//Key<Quaternion>
void
StreamQuatKey
(
Key
<
Quaternion
>
&
key
,
istream
&
file
,
uint
version
,
KeyType
type
);
void
StreamQuatKey
(
Key
<
Quaternion
>
&
key
,
istream
&
file
,
uint
version
,
KeyType
type
);
void
StreamQuatKey
(
Key
<
Quaternion
>
const
&
key
,
ostream
&
file
,
uint
version
,
KeyType
type
);
void
StreamQuatKey
(
Key
<
Quaternion
>
const
&
key
,
ostream
&
file
,
uint
version
,
KeyType
type
);
//vector<T>
//This version of NifStream allows whole vectors of data to be streamed
//Should probably be extended to work on all STL containers
template
<
class
T
>
void
NifStream
(
vector
<
T
>
&
val
,
istream
&
file
,
uint
version
=
0
)
{
typename
vector
<
T
>::
iterator
it
;
for
(
it
=
val
.
begin
();
it
!=
val
.
end
();
++
it
)
{
NifStream
(
*
it
,
file
,
version
);
}
}
template
<
class
T
>
void
NifStream
(
vector
<
T
>
const
&
val
,
ostream
&
file
,
uint
version
=
0
)
{
typename
vector
<
T
>::
const_iterator
it
;
for
(
it
=
val
.
begin
();
it
!=
val
.
end
();
++
it
)
{
NifStream
(
*
it
,
file
,
version
);
}
}
template
<
class
T
>
void
NifStream
(
vector
<
Key
<
T
>
>
&
val
,
istream
&
file
,
uint
version
,
uint
attr_arg
)
{
typename
vector
<
Key
<
T
>
>::
iterator
it
;
for
(
it
=
val
.
begin
();
it
!=
val
.
end
();
++
it
)
{
NifStream
(
*
it
,
file
,
version
,
attr_arg
);
}
}
template
<
class
T
>
void
NifStream
(
vector
<
Key
<
T
>
>
const
&
val
,
ostream
&
file
,
uint
version
,
uint
attr_arg
)
{
typename
vector
<
Key
<
T
>
>::
const_iterator
it
;
for
(
it
=
val
.
begin
();
it
!=
val
.
end
();
++
it
)
{
NifStream
(
*
it
,
file
,
version
,
attr_arg
);
}
}
//The HexString function creates a formatted hex display of the given data for use in printing
//The HexString function creates a formatted hex display of the given data for use in printing
//a debug string for information that is not understood
//a debug string for information that is not understood
string
HexString
(
const
byte
*
src
,
uint
len
);
string
HexString
(
const
byte
*
src
,
uint
len
);
...
...
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