Comments (2)
POC for removal of the any
type, using ostream
:
#ifndef FILE_HPP
#define FILE_HPP
#include <string>
#include <iostream>
#include <fstream>
class File : public std::ostream {
public:
using std::ostream::operator<<;
virtual ~File() = default;
// Needed for resolving the overload ambiguity
File& operator<<(const char* val) {
*this << std::string(val);
return *this;
}
};
class TextFile: public File {
public:
explicit TextFile(const std::string& path) : file(path) {
File::rdbuf(file.rdbuf());
}
~TextFile() = default;
private:
std::ofstream file;
};
#endif
from chemfiles.
The filesystem library is only used by the tests. It can be removed later, when the filesystem TS lands.
from chemfiles.
Related Issues (20)
- Trajectory reading in C++ causes continuous memory allocation, possible memory leak HOT 5
- TNG: cannot read last frame of 1aki.tng HOT 6
- Symmetry operations (pdbx_struct_oper_list) in mmCIF HOT 6
- N-terminal hydrogens not listed in PDB connectivity HOT 2
- Update codecove uploader in CI
- Tracking issue for release 0.10.2 HOT 1
- Unit change during GROMACS reading. HOT 2
- Add a frame property indicating if coordinates are unwrapped HOT 6
- Multi-threaded trajectory reading fails occasionally HOT 2
- Incorrect unit cell while writing to xyz file HOT 5
- Mechanism to pass arbitrary metadata to readers/writers HOT 1
- Tracking issue for release 0.10.3 HOT 1
- Add support for symbolic Atom types in LAMMPS
- "mmap failed" for binary formats on WSL1 HOT 9
- In Chemfiles.jl output trajectory file has a compact format and thus loses precision
- TPR file read error HOT 3
- Tracking issue for release 0.10.4 HOT 1
- [feature request] Feasibility of reading angle dihedral and improper HOT 10
- the version of chemfiles does not match chemfiles-lib and chemfiles-python in conda-forge HOT 3
- XTC format change for very large systems HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chemfiles.