~ubuntu-branches/ubuntu/saucy/ifrit/saucy

« back to all changes in this revision

Viewing changes to core/iviewobjectobserver.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Mark Hymers
  • Date: 2006-10-28 15:06:32 UTC
  • mfrom: (1.1.4 upstream) (2.1.1 etch)
  • Revision ID: james.westby@ubuntu.com-20061028150632-hyvuhvsv6zpmf5ev
Tags: 3.0.5-1
New upstream version. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*=========================================================================
2
 
 
3
 
  Program:   Ionization FRont Interactive Tool (IFRIT)
4
 
  Language:  C++
5
 
 
6
 
 
7
 
Copyright (c) 2002-2006 Nick Gnedin 
8
 
All rights reserved.
9
 
 
10
 
This file may be distributed and/or modified under the terms of the
11
 
GNU General Public License version 2 as published by the Free Software
12
 
Foundation and appearing in the file LICENSE.GPL included in the
13
 
packaging of this file.
14
 
 
15
 
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
16
 
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
 
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
 
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
19
 
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
 
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21
 
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22
 
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23
 
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24
 
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
 
 
26
 
=========================================================================*/
27
 
 
28
 
 
29
 
#include "iviewobjectobserver.h"
30
 
 
31
 
#include "icontrolmodule.h"
32
 
#include "idata.h"
33
 
#include "idatareader.h"
34
 
#include "iviewmodule.h"
35
 
#include "iviewobject.h"
36
 
 
37
 
 
38
 
using namespace iParameter;
39
 
 
40
 
 
41
 
iViewObjectObserver *iViewObjectObserver::New(iViewObject *vo)
42
 
{
43
 
        return new iViewObjectObserver(vo);
44
 
}
45
 
 
46
 
 
47
 
iViewObjectObserver::iViewObjectObserver(iViewObject *vo)
48
 
{
49
 
        mObject = vo;
50
 
        mIsoSurfaceData.Var = 0;
51
 
        mIsoSurfaceData.Level = 0.0f;
52
 
}
53
 
 
54
 
        
55
 
int iViewObjectObserver::GetObjectType() const
56
 
{
57
 
        if(mObject != 0) return mObject->GetObjectType(); else return _ObjectTypeUndefined;
58
 
}
59
 
 
60
 
 
61
 
const iDataType& iViewObjectObserver::GetDataType() const
62
 
{
63
 
        if(mObject != 0) return mObject->GetActiveDataType(); else return iDataType::Null();
64
 
}
65