ddc
action_store.h
Go to the documentation of this file.
1 /*
2 www.sourceforge.net/projects/tinyxpath
3 Copyright (c) 2002-2004 Yves Berquin (yvesb@users.sourceforge.net)
4 
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any
7 damages arising from the use of this software.
8 
9 Permission is granted to anyone to use this software for any
10 purpose, including commercial applications, and to alter it and
11 redistribute it freely, subject to the following restrictions:
12 
13 1. The origin of this software must not be misrepresented; you must
14 not claim that you wrote the original software. If you use this
15 software in a product, an acknowledgment in the product documentation
16 would be appreciated but is not required.
17 
18 2. Altered source versions must be plainly marked as such, and
19 must not be misrepresented as being the original software.
20 
21 3. This notice may not be removed or altered from any source
22 distribution.
23 */
24 
30 #ifndef __ACTION_STORE_H
31 #define __ACTION_STORE_H
32 
33 #include "tinyxml.h"
34 
35 namespace TinyXPath
36 {
37 
41 {
42 public :
44  action_item (int i_in_1, int i_in_2, int i_in_3, const char * cp_string) :
45  i_1 (i_in_1), i_2 (i_in_2), i_3 (i_in_3), S_string (cp_string)
46  {
47  }
48 
50  void v_get (int & i_out_1, int & i_out_2, int & i_out_3, TIXML_STRING & S_out)
51  {
52  i_out_1 = i_1;
53  i_out_2 = i_2;
54  i_out_3 = i_3;
55  S_out = S_string;
56  }
57 
58 protected :
60  int i_1, i_2, i_3;
63 } ;
64 
69 {
70 public :
71  action_store ();
72  ~ action_store ();
74  void v_add (int i_1, int i_2, int i_3, const char * cp_string);
76  int i_get_size () {return i_size;}
78  void v_get (int i_position, int & i_1, int & i_2, int & i_3, TIXML_STRING & S_out);
80  int i_get_position () {return i_position;}
82  void v_set_position (int i_where) {i_position = i_where;}
84  void v_dec_position () {i_position--;}
85 
86 protected :
88  int i_size;
93  int i_alloc;
96 } ;
97 
98 }
99 
100 #endif
101 
102 /*--- emacs style variables ---
103  * Local Variables:
104  * mode: C++
105  * c-file-style: "ellemtel"
106  * c-basic-offset: 4
107  * tab-width: 8
108  * indent-tabs-mode: nil
109  * End:
110  */
int i_size
Used number of elements.
Definition: action_store.h:88
TiXmlString S_string
String value.
Definition: action_store.h:62
void v_get(int &i_out_1, int &i_out_2, int &i_out_3, TiXmlString &S_out)
Retrieve the set of values.
Definition: action_store.h:50
int i_3
Definition: action_store.h:60
Definition: action_store.h:68
Definition: action_store.cpp:32
void v_set_position(int i_where)
Set the position to an arbitrary value. See i_position.
Definition: action_store.h:82
action_item ** aipp_list
Pointers to the allocated elements.
Definition: action_store.h:95
int i_1
Integer triplet values.
Definition: action_store.h:60
int i_alloc
Nb of allocated elements.
Definition: action_store.h:93
int i_get_size()
Get the current nb of stored elements.
Definition: action_store.h:76
int i_get_position()
Get the current position. See i_position.
Definition: action_store.h:80
int i_2
Definition: action_store.h:60
void v_dec_position()
Decrement the position. See i_position.
Definition: action_store.h:84
action_item(int i_in_1, int i_in_2, int i_in_3, const char *cp_string)
constructor
Definition: action_store.h:44
Definition: action_store.h:40
int i_position
Definition: action_store.h:91
#define TIXML_STRING
Definition: tinyxml.h:67