ubit
uargs.hpp
1 /************************************************************************
2  *
3  * uargs.hpp : argument lists.
4  * Ubit GUI Toolkit - Version 6
5  * (C) 2009 | Eric Lecolinet | TELECOM ParisTech | http://www.enst.fr/~elc/ubit
6  *
7  * ***********************************************************************
8  * COPYRIGHT NOTICE :
9  * THIS PROGRAM IS DISTRIBUTED WITHOUT ANY WARRANTY AND WITHOUT EVEN THE
10  * IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
11  * YOU CAN REDISTRIBUTE IT AND/OR MODIFY IT UNDER THE TERMS OF THE GNU
12  * GENERAL PUBLIC LICENSE AS PUBLISHED BY THE FREE SOFTWARE FOUNDATION;
13  * EITHER VERSION 2 OF THE LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.
14  * SEE FILES 'COPYRIGHT' AND 'COPYING' FOR MORE DETAILS.
15  * ***********************************************************************/
16 
17 #ifndef _uargs_hpp_
18 #define _uargs_hpp_ 1
19 #include <ubit/uargsImpl.hpp>
20 namespace ubit {
21 
22  class UArgsImpl;
23 
43  class UArgs {
44  public:
45  static const UArgs none;
47 
48  ~UArgs();
49  UArgs();
50  UArgs(UNode*);
51  UArgs(UNode&);
52  UArgs(const char*);
53  UArgs(const UChild&);
54  UArgs(const UArgs&);
55  UArgs(const UArgsImpl&);
56 
57  bool operator !() const;
59 
60  bool empty() const;
62 
63  UArgs& operator+=(const UArgs& arglist2);
65 
66  friend const UArgsImpl& operator+(const UArgsImpl&, const char* c_string);
68 
69  friend const UArgsImpl& operator+(const UArgsImpl&, UNode*);
71 
72  friend const UArgsImpl& operator+(const UArgsImpl&, UNode&);
74 
75  friend const UArgsImpl& operator+(const UArgsImpl&, const UChild&);
90  friend const UArgsImpl& operator+(const UArgsImpl&, const UArgs&);
92 
93  private:
94  UArgs& operator=(const UArgs&);
96 
97  friend class UElem;
98  friend class UArgsImpl;
99  class UArgsChildren* children;
100  };
101 
102 }
103 #endif
friend const UArgsImpl & operator+(const UArgsImpl &, const char *c_string)
adds a C String to this arglist (note that the string content is duplicated).
Base class of objects that can be added to the UBIT scene graph (SEE DETAILS!).
Definition: unode.hpp:38
bool empty() const
returns true is this arglist is empty.
Definition: uargs.cpp:51
lightweight general purpose container.
Definition: uelem.hpp:44
UArgs & operator+=(const UArgs &arglist2)
adds the children contained in &#39;arglist2&#39; to this arglist.
Definition: uargs.cpp:111
Argument list (for passing arguments to constructor or add functions).
Definition: uargs.hpp:43
Definition: uhardfont.hpp:31
static const UArgs none
the empty arglist.
Definition: uargs.hpp:45
Definition: uargsImpl.hpp:43
Definition: uargsImpl.hpp:99
bool operator!() const
returns true is this arglist is empty.
Definition: uargs.cpp:55
[impl] Internal implementation of a child node.
Definition: uchild.hpp:23