Elm  2
ELM is a library providing generic data structures, OS-independent interface, plugins and XML.
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/data/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;
21  Vector<Element *> elems;
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
elm::xom::Elements::size
int size(void) const
Definition: Elements.h:33
elm
Definition: adapter.h:26
elm::xom::Elements
Definition: Elements.h:19
elm::Vector
Definition: Vector.h:34
elm::xom::Element
Definition: Element.h:21
elm::xom::Elements::operator[]
Element * operator[](int index) const
Definition: Elements.h:37
elm::xom::Elements::get
Element * get(int index) const
Definition: Elements.h:29