Added GPLv3 headers all over the place.
[fail.git] / src / core / idlast / enumref.h
bloba71d971997ef6d670ffb6187a2b0a5cfcd5e67f9
1 /*
2 Fail game engine
3 Copyright 2007 Antoine Chavasse <a.chavasse@gmail.com>
5 This file is part of Fail.
7 Fail is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License version 3
9 as published by the Free Software Foundation.
11 Fail is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef FAIL_IDLAST_ENUMREF_H_
20 #define FAIL_IDLAST_ENUMREF_H_
22 #include <vector>
23 #include <string>
24 #include <set>
25 #include "element.h"
27 #include <iostream>
29 namespace fail { namespace idlast
31 class Enum;
33 typedef std::set< ConstPointer< Class > > DependencyList;
35 class EnumRef : public Element, public RefCounted, public ConstPointer< Enum >
37 public:
38 EnumRef( std::string FileName_, unsigned long Line_ ) :
39 Element( FileName_, Line_ )
41 // std::cout << "new classref " << this << std::endl;
44 void addComponent( std::string Component_ )
46 // std::cout << "add component " << Component_ << " to classref " << this << std::endl;
47 m_NameComponents.push_back( Component_ );
50 const EnumRef& operator=( const Enum* pEnum_ )
52 this->ConstPointer< Enum >::operator=( pEnum_ );
53 return *this;
56 void resolve( const Class* pClass_ );
58 private:
59 std::vector< std::string > m_NameComponents;
63 #endif