andrew@0
|
1 /*
|
andrew@0
|
2
|
andrew@0
|
3 Copyright (c) 2007-2009, Damian Stewart
|
andrew@0
|
4 All rights reserved.
|
andrew@0
|
5
|
andrew@0
|
6 Redistribution and use in source and binary forms, with or without
|
andrew@0
|
7 modification, are permitted provided that the following conditions are met:
|
andrew@0
|
8 * Redistributions of source code must retain the above copyright
|
andrew@0
|
9 notice, this list of conditions and the following disclaimer.
|
andrew@0
|
10 * Redistributions in binary form must reproduce the above copyright
|
andrew@0
|
11 notice, this list of conditions and the following disclaimer in the
|
andrew@0
|
12 documentation and/or other materials provided with the distribution.
|
andrew@0
|
13 * Neither the name of the developer nor the
|
andrew@0
|
14 names of its contributors may be used to endorse or promote products
|
andrew@0
|
15 derived from this software without specific prior written permission.
|
andrew@0
|
16
|
andrew@0
|
17 THIS SOFTWARE IS PROVIDED BY DAMIAN STEWART ''AS IS'' AND ANY
|
andrew@0
|
18 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
andrew@0
|
19 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
andrew@0
|
20 DISCLAIMED. IN NO EVENT SHALL DAMIAN STEWART BE LIABLE FOR ANY
|
andrew@0
|
21 DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
andrew@0
|
22 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
andrew@0
|
23 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
andrew@0
|
24 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
andrew@0
|
25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
andrew@0
|
26 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
andrew@0
|
27 */
|
andrew@0
|
28
|
andrew@0
|
29 #include "ofxOscBundle.h"
|
andrew@0
|
30
|
andrew@0
|
31
|
andrew@0
|
32 ofxOscBundle::ofxOscBundle()
|
andrew@0
|
33 {
|
andrew@0
|
34 }
|
andrew@0
|
35
|
andrew@0
|
36 ofxOscBundle::~ofxOscBundle()
|
andrew@0
|
37 {
|
andrew@0
|
38 }
|
andrew@0
|
39
|
andrew@0
|
40 ofxOscBundle& ofxOscBundle::copy( const ofxOscBundle& other )
|
andrew@0
|
41 {
|
andrew@0
|
42 for ( int i=0; i<other.bundles.size(); i++ )
|
andrew@0
|
43 {
|
andrew@0
|
44 bundles.push_back( other.bundles[i] );
|
andrew@0
|
45 }
|
andrew@0
|
46 for ( int i=0; i<other.messages.size(); i++ )
|
andrew@0
|
47 {
|
andrew@0
|
48 messages.push_back( other.messages[i] );
|
andrew@0
|
49 }
|
andrew@0
|
50 return *this;
|
andrew@0
|
51 }
|
andrew@0
|
52
|
andrew@0
|
53
|
andrew@0
|
54
|
andrew@0
|
55 void ofxOscBundle::addBundle( const ofxOscBundle& bundle )
|
andrew@0
|
56 {
|
andrew@0
|
57 bundles.push_back( bundle );
|
andrew@0
|
58 }
|
andrew@0
|
59
|
andrew@0
|
60 void ofxOscBundle::addMessage( const ofxOscMessage& message )
|
andrew@0
|
61 {
|
andrew@0
|
62 messages.push_back( message );
|
andrew@0
|
63 }
|
andrew@0
|
64
|