source: branches/1.7/src/objects/RpLibObj.h @ 6226

Last change on this file since 6226 was 5679, checked in by ldelgass, 9 years ago

Full merge 1.3 branch to uq branch to sync. Fixed partial subdirectory merge
by removing mergeinfo from lang/python/Rappture directory.

  • Property svn:eol-style set to native
File size: 1.8 KB
Line 
1/*
2 * ----------------------------------------------------------------------
3 *  Rappture Library Header
4 *
5 * ======================================================================
6 *  AUTHOR:  Derrick S. Kearney, Purdue University
7 *  Copyright (c) 2004-2012  HUBzero Foundation, LLC
8 *
9 *  See the file "license.terms" for information on usage and
10 *  redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
11 * ======================================================================
12 */
13
14#ifndef _RP_LIBRARY_H
15#define _RP_LIBRARY_H
16
17enum RP_LIBRARY_CONSTS {
18    RPLIB_OVERWRITE     = 0,
19    RPLIB_APPEND        = 1,
20    RPLIB_NO_TRANSLATE  = 0,
21    RPLIB_TRANSLATE     = 1,
22    RPLIB_NO_COMPRESS   = 0,
23    RPLIB_COMPRESS      = 1,
24};
25
26
27#ifdef __cplusplus
28
29#include "RpOutcome.h"
30#include "RpInt.h"
31#include "RpChain.h"
32#include "RpParserXML.h"
33#include "RpLibStorage.h"
34#include <cstdarg>
35
36namespace Rappture {
37
38class Library
39{
40    public:
41        Library();
42        // Library(const Library& o);
43        virtual ~Library();
44
45        Outcome &loadXml(const char *xmltext);
46        Outcome &loadFile(const char *filename);
47
48
49        Library &value(const char *key, void *storage,
50            size_t numHints, ...);
51
52        // Rp_Chain *diff(Library *lib);
53
54        // Library &remove (const char *key);
55
56        const char *xml() const;
57
58        Outcome &outcome() const;
59        int error() const;
60
61        // Outcome &result(int status);
62
63        const Rp_Chain *contains() const;
64    private:
65        LibraryStorage _objStorage;
66        mutable Outcome _status;
67
68        void __libInit();
69        void __libFree();
70        void __parseTree2ObjectList(Rp_ParserXml *p);
71
72}; // end class Library
73
74} // end namespace Rappture
75
76
77#endif // ifdef __cplusplus
78
79#endif // ifndef _RP_LIBRARY_H
Note: See TracBrowser for help on using the repository browser.