Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
a3b5ce99
Unverified
Commit
a3b5ce99
authored
Mar 06, 2024
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
loading extra compound info changed
cif::file constructors
parent
9eb06e92
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
include/cif++/file.hpp
+16
-4
include/cif++/iterator.hpp
+1
-1
src/compound.cpp
+11
-3
No files found.
include/cif++/file.hpp
View file @
a3b5ce99
...
@@ -100,10 +100,22 @@ class file : public std::list<datablock>
...
@@ -100,10 +100,22 @@ class file : public std::list<datablock>
}
}
/** @cond */
/** @cond */
file
(
const
file
&
)
=
default
;
file
(
const
file
&
rhs
)
file
(
file
&&
)
=
default
;
:
std
::
list
<
datablock
>
(
rhs
)
file
&
operator
=
(
const
file
&
)
=
default
;
{
file
&
operator
=
(
file
&&
)
=
default
;
}
file
(
file
&&
rhs
)
{
this
->
swap
(
rhs
);
}
file
&
operator
=
(
file
f
)
{
this
->
swap
(
f
);
return
*
this
;
}
/** @endcond */
/** @endcond */
/**
/**
...
...
include/cif++/iterator.hpp
View file @
a3b5ce99
...
@@ -49,7 +49,7 @@ namespace cif
...
@@ -49,7 +49,7 @@ namespace cif
/**
/**
* @brief Implementation of an iterator that can return
* @brief Implementation of an iterator that can return
* multiple values in a tuple. Of course, that tuple can
* multiple values in a tuple. Of course, that tuple can
* then used in structured binding to receive the values
* then
be
used in structured binding to receive the values
* in a for loop e.g.
* in a for loop e.g.
*
*
* @tparam Category The category for this iterator
* @tparam Category The category for this iterator
...
...
src/compound.cpp
View file @
a3b5ce99
...
@@ -550,7 +550,7 @@ class local_compound_factory_impl : public compound_factory_impl
...
@@ -550,7 +550,7 @@ class local_compound_factory_impl : public compound_factory_impl
compound
*
create
(
const
std
::
string
&
id
)
override
;
compound
*
create
(
const
std
::
string
&
id
)
override
;
private
:
private
:
c
onst
cif
::
file
&
m_local_file
;
c
if
::
file
m_local_file
;
};
};
compound
*
local_compound_factory_impl
::
create
(
const
std
::
string
&
id
)
compound
*
local_compound_factory_impl
::
create
(
const
std
::
string
&
id
)
...
@@ -559,11 +559,19 @@ compound *local_compound_factory_impl::create(const std::string &id)
...
@@ -559,11 +559,19 @@ compound *local_compound_factory_impl::create(const std::string &id)
for
(
auto
&
db
:
m_local_file
)
for
(
auto
&
db
:
m_local_file
)
{
{
if
(
db
.
name
()
==
"comp_"
+
id
)
if
(
db
.
name
()
==
id
)
{
{
cif
::
datablock
db_copy
(
db
);
cif
::
datablock
db_copy
(
db
);
result
=
new
compound
(
db_copy
,
1
);
try
{
result
=
new
compound
(
db_copy
,
1
);
}
catch
(
const
std
::
exception
&
ex
)
{
std
::
throw_with_nested
(
std
::
runtime_error
(
"Error loading compound "
+
id
));
}
std
::
shared_lock
lock
(
mMutex
);
std
::
shared_lock
lock
(
mMutex
);
m_compounds
.
push_back
(
result
);
m_compounds
.
push_back
(
result
);
...
...
Write
Preview
Markdown
is supported
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