⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 user_object.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: User_object.hpp,v $ * PRODUCTION Revision 1000.0  2003/10/29 21:01:19  gouriano * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.5 * PRODUCTION * =========================================================================== *//* $Id: User_object.hpp,v 1000.0 2003/10/29 21:01:19 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:  ....... * * File Description: *   ....... * * Remark: *   This code was originally generated by application DATATOOL *   using specifications from the ASN data definition file *   'general.asn'. */#ifndef OBJECTS_GENERAL_USER_OBJECT_HPP#define OBJECTS_GENERAL_USER_OBJECT_HPP// generated includes#include <objects/general/User_object_.hpp>// generated classesBEGIN_NCBI_SCOPEBEGIN_objects_SCOPE // namespace ncbi::objects::class NCBI_GENERAL_EXPORT CUser_object : public CUser_object_Base{    typedef CUser_object_Base Tparent;public:    // constructor    CUser_object(void);    // destructor    ~CUser_object(void);    // add a data field to the user object that holds a given value    CUser_object& AddField(const string& label, const string& value);    CUser_object& AddField(const string& label, int           value);    CUser_object& AddField(const string& label, double        value);    CUser_object& AddField(const string& label, bool          value);    CUser_object& AddField(const string& label, const vector<string>& value);    CUser_object& AddField(const string& label, const vector<int>&    value);    CUser_object& AddField(const string& label, const vector<double>& value);    CUser_object& AddField(const string& label, CUser_object& value);    CUser_object& AddField(const string& label,                           const list< CRef<CUser_object> >& value);    CUser_object& AddField(const string& label,                           const list< CRef<CUser_field> >& value);    // access a named field in this user object.  This is a little    // sneaky in that it interprets a delimiter for recursion.    // The GetXXX() version will throw an exception if the field    // doesn't exist.    const CUser_field& GetField(const string& str,                                const string& delim = ".") const;    CUser_field&       SetField(const string& str,                                const string& delim = ".");    bool               HasField(const string& str,                                const string& delim = ".") const;    // enum controlling what to return for a label    // this mirrors a request inside of feature::GetLabel()    enum ELabelContent {        eType,        eContent,        eBoth    };    // Append a label to label.  The type defaults to content for    // backward compatibility    void GetLabel(string* label, ELabelContent mode = eContent) const;    //    // enums for implicit typing of user objects    //    // general category    enum ECategory {        eCategory_Unknown = -1,        eCategory_Experiment    };    // sub-category experiment    enum EExperiment {        eExperiment_Unknown = -1,        eExperiment_Sage    };    // accessors: classify a given user object    ECategory GetCategory(void) const;    // sub-category accessors:    EExperiment GetExperimentType(void) const;    const CUser_object& GetExperiment(void) const;    // format a user object as a given type.  This returns a user-object    // that is suitable for containing whatever specifics might be needed    CUser_object& SetCategory(ECategory category);    // format a user object as a given type.  This returns a user-object    // that is suitable for containing whatever specifics might be needed    CUser_object& SetExperiment(EExperiment category);private:    // Prohibit copy constructor and assignment operator    CUser_object(const CUser_object& value);    CUser_object& operator=(const CUser_object& value);};/////////////////// CUser_object inline methods// constructorinlineCUser_object::CUser_object(void){}/////////////////// end of CUser_object inline methodsEND_objects_SCOPE // namespace ncbi::objects::END_NCBI_SCOPE/** ===========================================================================** $Log: User_object.hpp,v $* Revision 1000.0  2003/10/29 21:01:19  gouriano* PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.5** Revision 1.5  2003/09/29 15:17:14  dicuccio* Fleshed out CUser_object API.  Added API to retrieve fields based on a* delimited key.  Added ability to encode a CUser_object as one of a number of* standard types (only experiment types are supported currently)** Revision 1.4  2003/06/19 00:53:56  dicuccio* Added interface functions for adding defined key-value pairs as CUser_field* sub-objects** Revision 1.3  2002/12/26 12:40:33  dicuccio* Added Win32 export specifiers** Revision 1.2  2002/10/03 19:01:02  clausen* Removed extra whitespace** Revision 1.1  2002/10/03 17:00:33  clausen* Added GetLabel()*** ===========================================================================*/#endif // OBJECTS_GENERAL_USER_OBJECT_HPP/* Original file checksum: lines: 93, chars: 2438, CRC32: 8ba203fc */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -