source: icGREP/icgrep-0.8/icgrep/re_alt.cpp @ 3972

Last change on this file since 3972 was 3850, checked in by cameron, 5 years ago

icgrep-0.8 distribution

File size: 667 bytes
Line 
1/*
2 *  Copyright (c) 2014 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#include "re_alt.h"
8
9Alt::Alt()
10{
11    mList = new std::list<RE*>();
12}
13
14Alt::Alt(std::list<RE*>* lst)
15{
16    mList = new std::list<RE*>();
17    std::list<RE*>::iterator it;
18    it=lst->begin();
19    mList->assign(it, lst->end());
20    mList->reverse();
21}
22
23Alt::~Alt()
24{
25    while(!mList->empty()) delete mList->back(), mList->pop_back();
26    delete mList;
27}
28
29std::list<RE*>* Alt::GetREList()
30{
31    return mList;
32}
33
34void Alt::AddREListItem(RE* re)
35{
36    mList->push_back(re);
37}
38
39
Note: See TracBrowser for help on using the repository browser.