RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
StreamOps.h File Reference
#include <RDGeneral/export.h>
#include "types.h"
#include "Invariant.h"
#include "RDProps.h"
#include <string>
#include <sstream>
#include <iostream>
#include <unordered_set>
#include <boost/cstdint.hpp>
#include <boost/predef.h>

Go to the source code of this file.

Classes

class  RDKit::CustomPropHandler
 

Namespaces

namespace  RDKit
 Std stuff.
 
namespace  RDKit::DTags
 

Typedefs

typedef std::vector< std::shared_ptr< const CustomPropHandler > > RDKit::CustomPropHandlerVec
 

Enumerations

enum  RDKit::EEndian { RDKit::LITTLE_ENDIAN_ORDER , RDKit::BIG_ENDIAN_ORDER }
 

Functions

template<class T , unsigned int size>
RDKit::SwapBytes (T value)
 
template<EEndian from, EEndian to, class T >
RDKit::EndianSwapBytes (T value)
 
template<EEndian from, EEndian to>
char RDKit::EndianSwapBytes (char value)
 
template<EEndian from, EEndian to>
unsigned char RDKit::EndianSwapBytes (unsigned char value)
 
template<EEndian from, EEndian to>
signed char RDKit::EndianSwapBytes (signed char value)
 
void RDKit::appendPackedIntToStream (std::stringstream &ss, boost::uint32_t num)
 Packs an integer and outputs it to a stream.
 
boost::uint32_t RDKit::readPackedIntFromStream (std::stringstream &ss)
 Reads an integer from a stream in packed format and returns the result.
 
boost::uint32_t RDKit::pullPackedIntFromString (const char *&text)
 
template<typename T >
void RDKit::streamWrite (std::ostream &ss, const T &val)
 does a binary write of an object to a stream
 
void RDKit::streamWrite (std::ostream &ss, const std::string &what)
 special case for string
 
template<typename T >
void RDKit::streamWriteVec (std::ostream &ss, const T &val)
 
template<typename T >
void RDKit::streamRead (std::istream &ss, T &loc)
 does a binary read of an object from a stream
 
template<class T >
void RDKit::streamRead (std::istream &ss, T &obj, int version)
 special case for string
 
void RDKit::streamRead (std::istream &ss, std::string &what, int version)
 
template<class T >
void RDKit::streamReadVec (std::istream &ss, T &val)
 
void RDKit::streamReadStringVec (std::istream &ss, std::vector< std::string > &val, int version)
 
std::string RDKit::getLine (std::istream *inStream)
 grabs the next line from an instream and returns it.
 
std::string RDKit::getLine (std::istream &inStream)
 grabs the next line from an instream and returns it.
 
bool RDKit::isSerializable (const Dict::Pair &pair, const CustomPropHandlerVec &handlers={})
 
bool RDKit::streamWriteProp (std::ostream &ss, const Dict::Pair &pair, const CustomPropHandlerVec &handlers={})
 
template<typename COUNT_TYPE = unsigned int>
bool RDKit::streamWriteProps (std::ostream &ss, const RDProps &props, bool savePrivate=false, bool saveComputed=false, const CustomPropHandlerVec &handlers={}, const std::unordered_set< std::string > &ignore={})
 
template<class T >
void RDKit::readRDValue (std::istream &ss, RDValue &value)
 
template<class T >
void RDKit::readRDVecValue (std::istream &ss, RDValue &value)
 
void RDKit::readRDValueString (std::istream &ss, RDValue &value)
 
void RDKit::readRDStringVecValue (std::istream &ss, RDValue &value)
 
bool RDKit::streamReadProp (std::istream &ss, Dict::Pair &pair, bool &dictHasNonPOD, const CustomPropHandlerVec &handlers={})
 
template<typename COUNT_TYPE = unsigned int>
unsigned int RDKit::streamReadProps (std::istream &ss, RDProps &props, const CustomPropHandlerVec &handlers={}, bool reset=true)
 

Variables

const unsigned char RDKit::DTags::StringTag = 0
 
const unsigned char RDKit::DTags::IntTag = 1
 
const unsigned char RDKit::DTags::UnsignedIntTag = 2
 
const unsigned char RDKit::DTags::BoolTag = 3
 
const unsigned char RDKit::DTags::FloatTag = 4
 
const unsigned char RDKit::DTags::DoubleTag = 5
 
const unsigned char RDKit::DTags::VecStringTag = 6
 
const unsigned char RDKit::DTags::VecIntTag = 7
 
const unsigned char RDKit::DTags::VecUIntTag = 8
 
const unsigned char RDKit::DTags::VecBoolTag = 9
 
const unsigned char RDKit::DTags::VecFloatTag = 10
 
const unsigned char RDKit::DTags::VecDoubleTag = 11
 
const unsigned char RDKit::DTags::CustomTag = 0xFE
 
const unsigned char RDKit::DTags::EndTag = 0xFF