root/ossie/trunk/ossie/parser/UsesPort.cpp @ 3344

Revision 3344, 2.1 KB (checked in by balister, 6 years ago)

More parser bugs fixed.

  • Property svn:eol-style set to native
Line 
1/*******************************************************************************
2
3Copyright 2004, 2007 Virginia Polytechnic Institute and State University
4
5This file is part of the OSSIE Parser.
6
7OSSIE Parser is free software; you can redistribute it and/or modify
8it under the terms of the Lesser GNU General Public License as published by
9the Free Software Foundation; either version 2.1 of the License, or
10(at your option) any later version.
11
12OSSIE Parser is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15Lesser GNU General Public License for more details.
16
17You should have received a copy of the Lesser GNU General Public License
18along with OSSIE Parser; if not, write to the Free Software
19Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20
21Even though all code is original, the architecture of the OSSIE Parser is based
22on the architecture of the CRCs SCA Reference Implementation (SCARI)
23see: http://www.crc.ca/en/html/rmsc/home/sdr/projects/scari
24
25*********************************************************************************/
26
27#include "ossie/UsesPort.h"
28#include "ossie/debug.h"
29
30UsesPort::UsesPort(TiXmlElement *root) : Port(root)
31{
32    DEBUG(9, UsesPort, "In constructor.");
33
34    Port::parsePort(root);    // call the base class first
35    parseID(root);
36}
37
38
39// copy constructor
40UsesPort::UsesPort(const UsesPort & _up):
41identifier(NULL)
42{
43
44    this->ifComponentInstantiationRef = _up.ifComponentInstantiationRef;
45    this->ifDeviceThatLoadedThisComponentRef =
46    _up.ifDeviceThatLoadedThisComponentRef;
47    this->ifDeviceUsedByThisComponentRef = _up.ifDeviceUsedByThisComponentRef;
48    this->ifFindBy = _up.ifFindBy;
49
50    identifier = _up.identifier;
51}
52
53UsesPort::~UsesPort()
54{
55}
56
57
58void UsesPort::parseID(TiXmlElement *elem)
59{
60    TiXmlElement *usesId = elem->FirstChildElement("usesidentifier");
61    identifier = usesId->GetText();
62
63    DEBUG(9, UsesPort, "Found uses port " << identifier);
64}
65
66const char* UsesPort::getID()
67{
68    return identifier.c_str();
69}
Note: See TracBrowser for help on using the browser.