~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to Tools/EditorFramework/DataType.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*!
 
2
        @file
 
3
        @author         Albert Semenov
 
4
        @date           07/2012
 
5
*/
 
6
 
 
7
#include "Precompiled.h"
 
8
#include "DataType.h"
 
9
 
 
10
namespace tools
 
11
{
 
12
 
 
13
        DataType::DataType()
 
14
        {
 
15
        }
 
16
 
 
17
        DataType::~DataType()
 
18
        {
 
19
        }
 
20
 
 
21
        void DataType::deserialization(pugi::xml_node _node)
 
22
        {
 
23
                mName = _node.select_single_node("Name").node().child_value();
 
24
                mFriend = _node.select_single_node("Friend").node().child_value();
 
25
 
 
26
                pugi::xpath_node_set childs = _node.select_nodes("Childs/Child/Type");
 
27
                for (pugi::xpath_node_set::const_iterator child = childs.begin(); child != childs.end(); child ++)
 
28
                        mChilds.push_back((*child).node().child_value());
 
29
 
 
30
                pugi::xpath_node_set properties = _node.select_nodes("Properties/Property");
 
31
                for (pugi::xpath_node_set::const_iterator property = properties.begin(); property != properties.end(); property ++)
 
32
                {
 
33
                        DataTypePropertyPtr info(new DataTypeProperty());
 
34
                        info->deserialization((*property).node());
 
35
                        mProperties.push_back(info);
 
36
                }
 
37
        }
 
38
 
 
39
        const std::string& DataType::getName() const
 
40
        {
 
41
                return mName;
 
42
        }
 
43
 
 
44
        const std::string& DataType::getFriend() const
 
45
        {
 
46
                return mFriend;
 
47
        }
 
48
 
 
49
        const DataType::VectorString& DataType::getChilds() const
 
50
        {
 
51
                return mChilds;
 
52
        }
 
53
 
 
54
        const DataType::VectorProperty& DataType::getProperties() const
 
55
        {
 
56
                return mProperties;
 
57
        }
 
58
 
 
59
        bool DataType::isChild(const std::string& _child) const
 
60
        {
 
61
                for (VectorString::const_iterator child = mChilds.begin(); child != mChilds.end(); child ++)
 
62
                {
 
63
                        if ((*child) == _child)
 
64
                                return true;
 
65
                }
 
66
 
 
67
                return false;
 
68
        }
 
69
 
 
70
}