pdf_obj.hpp

来自「ncbi源码」· HPP 代码 · 共 212 行

HPP
212
字号
/* * =========================================================================== * PRODUCTION $Log: pdf_obj.hpp,v $ * PRODUCTION Revision 1000.0  2003/10/31 22:06:27  gouriano * PRODUCTION PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.3 * PRODUCTION * =========================================================================== */#ifndef GUI_UTILS__PDF_OBJ_HPP#define GUI_UTILS__PDF_OBJ_HPP/*  $Id: pdf_obj.hpp,v 1000.0 2003/10/31 22:06:27 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. * * =========================================================================== * * Authors:  Peter Meric * * File Description: *   CPdfObj - Represent PDF data objects */#include <corelib/ncbiobj.hpp>#include <map>BEGIN_NCBI_SCOPEclass CPdfObject;class CPdfObj : public CObject{public:    typedef CRef<CPdfObj> TPdfObjRef;    CPdfObj(const string& str);    CPdfObj();    virtual ~CPdfObj();    // print the CPdfObject    virtual void PrintTo(CNcbiOstream& stream) const;protected:    string m_Str;};inline CNcbiOstream& operator<<(CNcbiOstream& strm, const CPdfObj& obj){    obj.PrintTo(strm);    return strm;}class CPdfRotate : public CPdfObj{public:    CPdfRotate(double angle);    virtual ~CPdfRotate();    virtual void PrintTo(CNcbiOstream& stream) const;private:    double m_Rot;};class CPdfTranslate : public CPdfObj{public:    CPdfTranslate(double xoff, double yoff);    CPdfTranslate(int xoff, int yoff);    CPdfTranslate(unsigned int xoff, unsigned int yoff);    virtual ~CPdfTranslate();    virtual void PrintTo(CNcbiOstream& stream) const;private:    double m_XOff;    double m_YOff;    unsigned int m_Prec;};class CPdfNumber : public CPdfObj{public:    CPdfNumber(double d);    CPdfNumber(int i);    CPdfNumber(unsigned int i);    virtual ~CPdfNumber();    virtual void PrintTo(CNcbiOstream& stream) const;private:    double m_Num;    unsigned int m_Prec;};class CPdfString : public CPdfObj{public:    CPdfString(const string& str);    virtual ~CPdfString();    virtual void PrintTo(CNcbiOstream& stream) const;};class CPdfName : public CPdfObj{public:    CPdfName(const string& str);    virtual ~CPdfName();    virtual void PrintTo(CNcbiOstream& stream) const;};class CPdfIndirectObj : public CPdfObj{public:    CPdfIndirectObj(const CRef<CPdfObject>& obj);    virtual ~CPdfIndirectObj();    virtual void PrintTo(CNcbiOstream& stream) const;private:    CRef<CPdfObject> m_Obj;};class CPdfArray : public CPdfObj{public:    typedef vector<TPdfObjRef> TArray;    TArray& GetArray(void);    virtual void PrintTo(CNcbiOstream& stream) const;    void Add(const CRef<CPdfArray>& arr);private:    TArray m_Array;};class CPdfDictionary : public CPdfObj{public:    TPdfObjRef& operator[](const string& key);    virtual void PrintTo(CNcbiOstream& stream) const;    void Add(const CRef<CPdfDictionary>& dict);private:    typedef map<string, TPdfObjRef> TDict;    TDict m_Dict;};END_NCBI_SCOPE#endif // GUI_UTILS__PDF_OBJ_HPP/* * =========================================================================== * $Log: pdf_obj.hpp,v $ * Revision 1000.0  2003/10/31 22:06:27  gouriano * PRODUCTION: IMPORTED [ORIGINAL] Dev-tree R1.3 * * Revision 1.3  2003/06/24 15:44:09  meric * Added CPdfRotate and CPdfTranslate * Added CPdfArray::Add(...) * Added CPdfNumber ctors for [unsigned] int, set precision on output * * Revision 1.2  2003/06/16 12:46:21  dicuccio * Clean-up after initial commit * * Revision 1.1  2003/06/13 19:00:30  meric * Initial version * * * =========================================================================== */

⌨️ 快捷键说明

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