亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? optional.hpp

?? ncbi源碼
?? HPP
字號:
/* * =========================================================================== * PRODUCTION $Log: optional.hpp,v $ * PRODUCTION Revision 1000.0  2003/10/29 18:24:29  gouriano * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.1 * PRODUCTION * =========================================================================== */#ifndef APP_BLAST_CLIENT___OPTIONAL__HPP#define APP_BLAST_CLIENT___OPTIONAL__HPP/*  $Id: optional.hpp,v 1000.0 2003/10/29 18:24:29 gouriano Exp $ * =========================================================================== * *                            PUBLIC DOMAIN NOTICE *               National Center for Biotechnology Information * *  This software/database is a "United States Government Work" under the *  terms of the United States Copyright Act.  It was written as part of *  the author's official duties as a United States Government employee and *  thus cannot be copyrighted.  This software/database is freely available *  to the public for use. The National Library of Medicine and the U.S. *  Government have not placed any restriction on its use or reproduction. * *  Although all reasonable efforts have been taken to ensure the accuracy *  and reliability of the software and data, the NLM and the U.S. *  Government do not and cannot warrant the performance or results that *  may be obtained by using this software or data. The NLM and the U.S. *  Government disclaim all warranties, express or implied, including *  warranties of performance, merchantability or fitness for any particular *  purpose. * *  Please cite the author in any work or product based on this material. * * =========================================================================== * * Author:  Kevin Bealer * *//// Optional value idiom for blast_client.////// Optional value concept (but not the actual code) is from the Boost/// libraries.  Many times in programming, we have the concept of a/// parameter which can either take a value or be omitted.  The/// Optional<> template expresses this idea directly in code, wrapping/// any value type.  Each optional object contains a boolean which is/// set to true if there is a meaningful value present, or false/// otherwise.  Attempts to read a false value will result in an/// assertion.  The presence of the value can be checked.  Also/// provided are functions which return an optional value from a CArgs/// object based on name; CArgs (unlike the C toolkit counterpart)/// preserves the information of whether an option was selected or/// omitted.  This obviates the need for 'sentinel' values, special/// "unreasonable" default values for each parameter, used to detect/// the absence of the parameter.  Optional values semantics are/// important to blast_client because of the design of the blast4/// (netblast) network protocols.  This design states that the blast4/// server would provide default values for (most) options if a value/// is not specified by the client.  It is therefore important to/// track which optional values are present.#include <corelib/ncbiargs.hpp>BEGIN_NCBI_SCOPE/// Optional template - wrap any value type as an optional value.////// Optional template - any value type may be wrapped as an optional/// value.  If no value has been set, the object is considered invalid/// and will fail an assertion if an attempt is made to read the/// value.  This class also provides a few basic 'logic' operations on/// optional values.template <typename T>class COptional{public:    /// Value constructor - produces a valid (present) object.    ///    /// Copy the value from the value type, set object to valid.    //  @param value The value to set.    COptional(T value)        : m_Value(value),          m_Exists(true)    {    }        /// Copy constructor - copies an existing object.    ///    /// Copy from another optional object.    /// @param other COptional object (valid or not) to copy.    COptional(const COptional<T> & other)        : m_Exists(other.m_Exists)    {        if (m_Exists) {            m_Value = other.m_Value;        }    }        /// Blank constructor - construct an invalid object.    COptional(void)        : m_Exists(false)    {    }        /// Returns true if the value is present/exists.    bool Exists(void) const    {        return m_Exists;    }        /// Returns the value, or throws an assertion (if not valid).    const T & GetValue(void) const    {        _ASSERT(m_Exists);        return m_Value;    }            /// Boolean max() operator - return the max of existing values.    ///    /// If both arguments exist: return the max.  If neither argument    /// exists, returns an invalid object.  Otherwise, one argument    /// exists, so return that object.    ///    /// @param lhs One argument.    /// @param rhs The other argument.    static COptional<T> Max(const COptional<T> & lhs,                            const COptional<T> & rhs);        /// Boolean min() operator - return the min of existing values.    ///    /// If both arguments exist: return the min.  If neither argument    /// exists, returns an invalid object.  Otherwise, one argument    /// exists, so return that object.    ///    /// @param lhs One argument.    /// @param rhs The other argument.    static COptional<T> Min(const COptional<T> & lhs,                            const COptional<T> & rhs);        /// Unary inversion operator - return the inverse of the value.    ///    /// If the argument exists: return ! value().  Otherwise, return    /// an invalid object.    ///    /// @param v The (possibly unset) value.        static COptional<T> Invert(const COptional<T> & v);        /// Assignment operator.    ///    /// Copy the state of another object.  If it exists, copy    /// the value as well.        const COptional<T> & operator= (const COptional<T> & other)    {        if (this != &other) {            m_Exists = other.m_Exists;                                    if (m_Exists) {                m_Value = other.m_Value;            }        }                        return *this;    }        private:    /// The actual value (if m_Exists is true).    T    m_Value;        /// If true, m_Value is meaningful.    bool m_Exists;};using std::string;/// Optional integer.typedef COptional<int>            TOptInteger;/// Optional bool.typedef COptional<bool>           TOptBool;/// Optional double prec float.typedef COptional<double>         TOptDouble;/// Optional string (pointer) value - be sure to delete the actual object.typedef COptional<string> TOptString;/// Optional input stream pointer - be sure to delete the actual object.typedef COptional<CNcbiIstream *> TOptInfile;/// Get existence and value from a boolean program parameter.inline TOptBool CheckArgsBool(const CArgValue & val){    if (val.HasValue()) {        return TOptBool(val.AsBoolean());    } else {        return TOptBool();    }}/// Get existence and value from a double program parameter.inline TOptDouble CheckArgsDouble(const CArgValue & val){    if (val.HasValue()) {        return TOptDouble(val.AsDouble());    } else {        return TOptDouble();    }}/// Get existence and value from an integer program parameter.inline TOptInteger CheckArgsInteger(const CArgValue & val){    if (val.HasValue()) {        return TOptInteger(val.AsInteger());    } else {        return TOptInteger();    }}/// Get existence and value from a string program parameter.inline TOptString CheckArgsString(const CArgValue & val){    if (val.HasValue()) {        return TOptString(val.AsString());    } else {        return TOptString();    }}template <class T>inline COptional<T> COptional<T>::Max(const COptional<T> & lhs,                                      const COptional<T> & rhs){    COptional<T> result;                    if (lhs.m_Exists) {        if (rhs.m_Exists) {            result.m_Exists = true;            result.m_Value = ((lhs.m_Value > rhs.m_Value)                              ? lhs.m_Value                              : rhs.m_Value);        } else {            result = lhs;        }    } else {        if (rhs.m_Exists) {            result = rhs;        }    }                    return result;}template <class T>inline COptional<T> COptional<T>::Min(const COptional<T> & lhs,                                      const COptional<T> & rhs){    COptional<T> result;                    if (lhs.m_Exists) {        if (rhs.m_Exists) {            result.m_Exists = true;            result.m_Value = ((lhs.m_Value < rhs.m_Value)                              ? lhs.m_Value                              : rhs.m_Value);        } else {            result = lhs;        }    } else {        if (rhs.m_Exists) {            result = rhs;        }    }                    return result;}template <class T>inline COptional<T> COptional<T>::Invert(const COptional<T> & v){    COptional<T> result;        if (v.m_Exists) {        result.m_Exists = true;        result.m_Value = ! v.m_Value;    }        return result;}/* * =========================================================================== * * $Log: optional.hpp,v $ * Revision 1000.0  2003/10/29 18:24:29  gouriano * PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.1 * * Revision 1.1  2003/09/26 16:53:49  bealer * - Add blast_client project for netblast protocol, initial code commit. * * =========================================================================== */END_NCBI_SCOPE#endif // APP_BLAST_CLIENT___OPTIONAL__HPP

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品自在欧美一区| 成人动漫精品一区二区| 亚洲欧洲色图综合| 精品国产乱码91久久久久久网站| 91亚洲永久精品| 国产精品一区免费视频| 日本免费新一区视频| 亚洲人成7777| 中文幕一区二区三区久久蜜桃| 欧美精品亚洲二区| 欧美这里有精品| 99在线精品一区二区三区| 国内精品伊人久久久久影院对白| 午夜欧美电影在线观看| 成人欧美一区二区三区小说| 久久男人中文字幕资源站| 91麻豆精品国产综合久久久久久| 一本久道久久综合中文字幕| 国产伦精品一区二区三区在线观看| 午夜影视日本亚洲欧洲精品| 亚洲三级在线播放| 国产日韩欧美a| 久久综合丝袜日本网| 欧美一二三在线| 欧美日韩免费一区二区三区| 欧美专区亚洲专区| 一本在线高清不卡dvd| 91在线视频观看| 成人av片在线观看| 成人高清av在线| 成人美女视频在线观看| 成人性视频网站| 成熟亚洲日本毛茸茸凸凹| 国产sm精品调教视频网站| 国产不卡一区视频| 成人晚上爱看视频| av一区二区不卡| 91香蕉视频mp4| 91老师片黄在线观看| 在线一区二区三区| 91久久精品日日躁夜夜躁欧美| 在线观看www91| 欧美午夜在线一二页| 欧美日韩国产综合草草| 91精品久久久久久久久99蜜臂| 91精品欧美一区二区三区综合在 | 美日韩一区二区| 日韩国产欧美在线播放| 视频一区视频二区中文| 天堂av在线一区| 蜜桃视频在线一区| 国产综合成人久久大片91| 国产成人高清在线| 成人sese在线| 色拍拍在线精品视频8848| 欧美精品日韩一区| 精品久久人人做人人爰| 国产精品女主播av| 樱桃国产成人精品视频| 日韩综合在线视频| 国内成人免费视频| 91亚洲资源网| 91精品国产色综合久久ai换脸| 欧美精品一区男女天堂| 欧美激情在线一区二区三区| 玉足女爽爽91| 久久国产精品免费| 风间由美性色一区二区三区| 在线视频国产一区| 亚洲精品一区二区三区福利| 亚洲欧洲www| 日韩精品一级中文字幕精品视频免费观看 | 91在线视频网址| 这里只有精品视频在线观看| 成人a级免费电影| 国产在线精品一区在线观看麻豆| 成人精品在线视频观看| 欧美探花视频资源| 国产欧美一区二区精品性色超碰| 亚洲综合精品自拍| 国产寡妇亲子伦一区二区| 欧美中文字幕亚洲一区二区va在线| 日韩欧美综合一区| 亚洲婷婷在线视频| 精品一区二区三区久久久| 97超碰欧美中文字幕| 精品久久久久久久久久久院品网| 亚洲情趣在线观看| 国产精选一区二区三区| 欧美日韩aaaaaa| 国产精品美女视频| 久久66热偷产精品| 欧美日韩一区小说| 国产精品另类一区| 激情综合亚洲精品| 欧美精品日韩精品| 99精品一区二区| 久久综合五月天婷婷伊人| 亚洲高清一区二区三区| 成人一区二区三区视频| 日韩精品一区二区三区在线 | 韩国精品在线观看| 欧美日韩不卡一区二区| 亚洲免费观看视频| 粉嫩在线一区二区三区视频| 日韩亚洲国产中文字幕欧美| 亚洲激情中文1区| 99久久久免费精品国产一区二区| 精品国产免费人成电影在线观看四季| 亚洲国产另类精品专区| 91香蕉视频黄| 综合网在线视频| 成人午夜看片网址| 国产欧美日韩精品在线| 黑人巨大精品欧美一区| 日韩免费福利电影在线观看| 日一区二区三区| 欧美日韩一区二区三区免费看| 亚洲人成影院在线观看| av男人天堂一区| 国产精品欧美久久久久无广告| 国产麻豆精品久久一二三| 精品国产乱码久久久久久影片| 日本aⅴ精品一区二区三区| 6080亚洲精品一区二区| 午夜成人免费视频| 欧美日韩电影在线| 无码av免费一区二区三区试看| 久久精品欧美一区二区三区不卡 | 亚洲欧美日韩一区二区| av激情亚洲男人天堂| 国产精品丝袜黑色高跟| 国产99久久久国产精品潘金| 亚洲国产精品v| 暴力调教一区二区三区| 最新国产成人在线观看| 91免费看`日韩一区二区| 亚洲欧美电影院| 欧美视频三区在线播放| 婷婷开心激情综合| 日韩天堂在线观看| 久久99精品网久久| 国产女人aaa级久久久级| 波多野结衣中文字幕一区| 日韩美女视频19| 欧美亚洲综合另类| 日本不卡中文字幕| 久久综合九色综合97_久久久| 国产精品香蕉一区二区三区| 国产精品每日更新| 日本精品一区二区三区高清| 图片区小说区国产精品视频| 精品国产百合女同互慰| 亚洲激情男女视频| 欧美日韩一卡二卡| 亚洲成a人片综合在线| 日韩一区和二区| 国产夫妻精品视频| 自拍偷拍国产精品| 欧美日韩国产系列| 精品一区二区三区视频在线观看| 欧美国产日产图区| 欧美性大战久久久久久久蜜臀| 麻豆91在线看| 成人欧美一区二区三区在线播放| 欧美色图天堂网| 国产一区二区三区在线看麻豆| 国产精品久久综合| 制服丝袜亚洲播放| 国产suv一区二区三区88区| 亚洲综合成人在线| www激情久久| 欧美午夜一区二区| 国产一区二区免费视频| 亚洲精品国产品国语在线app| 51精品秘密在线观看| 粉嫩高潮美女一区二区三区| 亚洲一二三区视频在线观看| 久久久噜噜噜久噜久久综合| 欧美在线免费播放| 国产ts人妖一区二区| 日韩精品免费专区| 国产精品伦一区二区三级视频| 欧美久久久影院| www.成人在线| 激情都市一区二区| 亚洲综合一二区| 国产视频一区在线播放| 欧美日韩国产系列| 91在线国产观看| 黑人巨大精品欧美黑白配亚洲| 亚洲精品五月天| 国产欧美日韩亚州综合| 91精品在线观看入口| 91网站视频在线观看| 国产精品中文字幕一区二区三区| 亚洲成人午夜影院| 亚洲三级久久久| 国产欧美日韩视频在线观看| 日韩欧美一级在线播放|