My Project
Namespaces | Classes | Typedefs | Functions
osl::misc Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  Align16New
 
class  AtomicCounter
 
class  BinaryElementReader
 
class  BinaryReader
 
struct  BinaryWriter
 
struct  BitOp
 
struct  Bsf
 x86 bsf 命令 More...
 
struct  Bsf< unsigned int >
 
struct  Bsf< unsigned long long >
 
struct  Bsf< unsigned short >
 
struct  Bsr
 
struct  Bsr< unsigned int >
 
struct  Bsr< unsigned long long >
 
struct  EmptyType
 
class  GeneralMask
 
struct  IconvConvert
 
struct  IncrementLock
 
struct  Int2Type
 
class  LightMutex
 
class  LightMutexChar
 
class  LightScopedLock
 
struct  NoMoreTime
 
struct  Player2Type
 
struct  Random
 
struct  Random< unsigned int >
 
struct  Random< unsigned long long >
 
struct  Type2Type
 

Typedefs

typedef GeneralMask< unsigned long long > Mask64
 
typedef unsigned long long mask_int_t
 
typedef GeneralMask< mask_int_tmask_t
 
typedef std::chrono::high_resolution_clock clock
 
typedef std::chrono::time_point< clocktime_point
 
typedef std::chrono::milliseconds milliseconds
 

Functions

template<typename T1 , typename T2 >
void construct (T1 *ptr, const T2 &value, typename boost::enable_if< detail::BitCopyTraits< T1 > >::type *=0)
 
template<typename T1 , typename T2 >
void construct (T1 *ptr, const T2 &value, typename boost::disable_if< detail::BitCopyTraits< T1 > >::type *=0)
 
template<typename T >
void destroy (T *ptr)
 
template<typename ForwardIterator >
void destroy (ForwardIterator first, ForwardIterator last)
 
template<class Integer >
bool operator== (const GeneralMask< Integer > &l, const GeneralMask< Integer > &r)
 
template<class Integer >
bool operator!= (const GeneralMask< Integer > &l, const GeneralMask< Integer > &r)
 
template<class Integer >
bool operator< (const GeneralMask< Integer > &l, const GeneralMask< Integer > &r)
 
template<class Integer >
const GeneralMask< Integer > operator& (GeneralMask< Integer > l, GeneralMask< Integer > r)
 
template<class Integer >
const GeneralMask< Integer > operator| (GeneralMask< Integer > l, GeneralMask< Integer > r)
 
template<class Integer >
const GeneralMask< Integer > operator^ (GeneralMask< Integer > l, GeneralMask< Integer > r)
 
template<class Integer >
const GeneralMask< Integer > operator<< (GeneralMask< Integer > m, int shift)
 
template<class Integer >
const GeneralMask< Integer > operator>> (GeneralMask< Integer > m, int shift)
 
std::ostream & operator<< (std::ostream &, const mask_t &)
 
unsigned int random ()
 
unsigned int time_seeded_random ()
 
std::string base64Encode (boost::dynamic_bitset<> src)
 
boost::dynamic_bitset base64Decode (std::string src)
 
std::string toBase64 (const book::CompactBoard &)
 
book::CompactBoard toCompactBoard (const std::string &str)
 
std::string eucToLang (const std::string &src)
 
std::string file_string (const boost::filesystem::path &path)
 
template<class Duration >
double toSeconds (Duration duration)
 
template<class Duration >
long long msec (Duration duration)
 
double elapsedSeconds (time_point start)
 
std::string sjis2euc (const std::string &str)
 Convert character encoding from Shift_JIS to EUC-JP.
 
void sjis2euc (unsigned char &c1, unsigned char &c2)
 Reference: http://www.net.is.uec.ac.jp/~ueno/material/kanji/sjis2euc.html.
 

Typedef Documentation

◆ clock

typedef std::chrono::high_resolution_clock osl::misc::clock

Definition at line 17 of file milliSeconds.h.

◆ Mask64

typedef GeneralMask<unsigned long long> osl::misc::Mask64

Definition at line 347 of file mask.h.

◆ mask_int_t

typedef unsigned long long osl::misc::mask_int_t

Definition at line 350 of file mask.h.

◆ mask_t

Definition at line 351 of file mask.h.

◆ milliseconds

typedef std::chrono::milliseconds osl::misc::milliseconds

Definition at line 19 of file milliSeconds.h.

◆ time_point

typedef std::chrono::time_point<clock> osl::misc::time_point

Definition at line 18 of file milliSeconds.h.

Function Documentation

◆ base64Decode()

boost::dynamic_bitset osl::misc::base64Decode ( std::string  src)

Definition at line 55 of file base64.cc.

◆ base64Encode()

std::string osl::misc::base64Encode ( boost::dynamic_bitset<>  src)

Definition at line 4 of file base64.cc.

Referenced by osl::book::MiniBoard::toBase64().

◆ construct() [1/2]

template<typename T1 , typename T2 >
void osl::misc::construct ( T1 *  ptr,
const T2 &  value,
typename boost::disable_if< detail::BitCopyTraits< T1 > >::type *  = 0 
)
inline

Definition at line 49 of file construct.h.

◆ construct() [2/2]

template<typename T1 , typename T2 >
void osl::misc::construct ( T1 *  ptr,
const T2 &  value,
typename boost::enable_if< detail::BitCopyTraits< T1 > >::type *  = 0 
)
inline

◆ destroy() [1/2]

template<typename ForwardIterator >
void osl::misc::destroy ( ForwardIterator  first,
ForwardIterator  last 
)
inline

Definition at line 63 of file construct.h.

References destroy().

◆ destroy() [2/2]

template<typename T >
void osl::misc::destroy ( T *  ptr)
inline

◆ elapsedSeconds()

double osl::misc::elapsedSeconds ( time_point  start)
inline

Definition at line 29 of file milliSeconds.h.

References elapsedSeconds(), and toSeconds().

Referenced by elapsedSeconds().

◆ eucToLang()

std::string osl::misc::eucToLang ( const std::string &  src)

◆ file_string()

std::string osl::misc::file_string ( const boost::filesystem::path &  path)

Definition at line 5 of file filePath.cc.

Referenced by osl::record::KisenFile::ipxFileName().

◆ msec()

template<class Duration >
long long osl::misc::msec ( Duration  duration)
inline

Definition at line 26 of file milliSeconds.h.

References msec().

Referenced by msec().

◆ operator!=()

template<class Integer >
bool osl::misc::operator!= ( const GeneralMask< Integer > &  l,
const GeneralMask< Integer > &  r 
)
inline

Definition at line 308 of file mask.h.

◆ operator&()

template<class Integer >
const GeneralMask< Integer > osl::misc::operator& ( GeneralMask< Integer >  l,
GeneralMask< Integer >  r 
)
inline

Definition at line 319 of file mask.h.

◆ operator<()

template<class Integer >
bool osl::misc::operator< ( const GeneralMask< Integer > &  l,
const GeneralMask< Integer > &  r 
)
inline

Definition at line 313 of file mask.h.

References osl::misc::GeneralMask< Integer >::value().

◆ operator<<() [1/2]

template<class Integer >
const GeneralMask< Integer > osl::misc::operator<< ( GeneralMask< Integer >  m,
int  shift 
)
inline

Definition at line 337 of file mask.h.

◆ operator<<() [2/2]

std::ostream & osl::misc::operator<< ( std::ostream &  ,
const mask_t  
)

◆ operator==()

template<class Integer >
bool osl::misc::operator== ( const GeneralMask< Integer > &  l,
const GeneralMask< Integer > &  r 
)
inline

Definition at line 303 of file mask.h.

References osl::misc::GeneralMask< Integer >::value().

◆ operator>>()

template<class Integer >
const GeneralMask< Integer > osl::misc::operator>> ( GeneralMask< Integer >  m,
int  shift 
)
inline

Definition at line 342 of file mask.h.

◆ operator^()

template<class Integer >
const GeneralMask< Integer > osl::misc::operator^ ( GeneralMask< Integer >  l,
GeneralMask< Integer >  r 
)
inline

Definition at line 331 of file mask.h.

◆ operator|()

template<class Integer >
const GeneralMask< Integer > osl::misc::operator| ( GeneralMask< Integer >  l,
GeneralMask< Integer >  r 
)
inline

Definition at line 325 of file mask.h.

◆ random()

unsigned int osl::misc::random ( )

◆ sjis2euc() [1/2]

std::string osl::misc::sjis2euc ( const std::string &  str)

Convert character encoding from Shift_JIS to EUC-JP.

This converter is simple enough to be applied to Shogi records. It may not completely implement the conversion algorithm.

Definition at line 9 of file sjis2euc.cc.

References sjis2euc().

Referenced by osl::ki2::Ki2File::Ki2File(), osl::record::KisenIpxFile::player(), sjis2euc(), and osl::record::KisenIpxFile::title().

◆ sjis2euc() [2/2]

void osl::misc::sjis2euc ( unsigned char &  c1,
unsigned char &  c2 
)

◆ time_seeded_random()

unsigned int osl::misc::time_seeded_random ( )

Definition at line 10 of file random.cc.

◆ toBase64()

std::string osl::misc::toBase64 ( const book::CompactBoard board)

Definition at line 106 of file base64.cc.

◆ toCompactBoard()

osl::book::CompactBoard osl::misc::toCompactBoard ( const std::string &  str)

Definition at line 131 of file base64.cc.

◆ toSeconds()

template<class Duration >
double osl::misc::toSeconds ( Duration  duration)
inline

Definition at line 22 of file milliSeconds.h.

References toSeconds().

Referenced by elapsedSeconds(), and toSeconds().