Elm  1.0
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Elements.h
1 /*
2  * $Id$
3  * Copyright (c) 2006, IRIT UPS.
4  *
5  * elm/xom/Elements.h -- XOM Elements class interface.
6  */
7 #ifndef ELM_XOM_ELEMENTS_H
8 #define ELM_XOM_ELEMENTS_H
9 
10 #include <elm/genstruct/Vector.h>
11 #include <elm/xom/String.h>
12 
13 namespace elm { namespace xom {
14 
15 // Predeclaration
16 class Element;
17 
18 // Elements class
19 class Elements {
20  friend class Element;
22 public:
23  inline Element *get(int index) const;
24  inline int size(void) const;
25  inline Element *operator[](int index) const;
26 };
27 
28 // Elements Inlines
29 inline Element *Elements::get(int index) const {
30  return elems[index];
31 }
32 
33 inline int Elements::size(void) const {
34  return elems.count();
35 }
36 
37 inline Element *Elements::operator[](int index) const {
38  return get(index);
39 }
40 
41 } } // elm::xom
42 
43 #endif // ELM_XOM_ELEMENTS_H
Definition: Elements.h:19
Element * get(int index) const
Definition: Elements.h:29
Element * operator[](int index) const
Definition: Elements.h:37
int size(void) const
Definition: Elements.h:33
Definition: Vector.h:35
Definition: Element.h:21