diff options
Diffstat (limited to 'client/.metadata/.plugins/org.eclipse.core.resources/.history/81')
3 files changed, 112 insertions, 0 deletions
diff --git a/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/10091b6d2b0d00131249f322b63acde8 b/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/10091b6d2b0d00131249f322b63acde8 new file mode 100644 index 0000000..eb90840 --- /dev/null +++ b/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/10091b6d2b0d00131249f322b63acde8 @@ -0,0 +1,18 @@ +package com.macaroon.piztor; + +import java.util.Vector; + +//--------------------------------------// +// Location Info // +//--------------------------------------// + +public class ResLocation extends Res{ + Vector<Rlocation> l; //vector for location info + int n; //number of location info + + ResLocation(int num,Vector<Rlocation> locationvec){ + super(3,255); //for type 3 + l = locationvec; + n = num; + } +}
\ No newline at end of file diff --git a/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/60af4207370d00131249f322b63acde8 b/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/60af4207370d00131249f322b63acde8 new file mode 100644 index 0000000..7033236 --- /dev/null +++ b/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/60af4207370d00131249f322b63acde8 @@ -0,0 +1,63 @@ +package com.macaroon.piztor; + +import java.util.*; + +import android.annotation.SuppressLint; + +@SuppressLint("UseSparseArrays") +public class ActMgr { + // event + PiztorAct act; + ActStatus nowStatus; + HashMap<ActStatus, HashMap<Integer, ActStatus>> mp; + + ActMgr(PiztorAct act, ActStatus nowStatus, ActStatus[] r) { + this.act = act; + this.nowStatus = nowStatus; + mp = new HashMap<ActStatus, HashMap<Integer, ActStatus>>(); + for (int i = 0; i < r.length; i++) { + mp.put(r[i], new HashMap<Integer, ActStatus>()); + } + } + + void trigger(int event) { + //for (Integer i : mp.get(nowStatus).keySet()) + //System.out.println(i); + if (mp.get(nowStatus).containsKey(event)) { + nowStatus.leave(event); + nowStatus = mp.get(nowStatus).get(event); + nowStatus.enter(event); + } else if (AppMgr.mp.get(act.getClass()).containsKey(event)) { + AppMgr.trigger(event); + } + } + + void add(ActStatus a, int event, ActStatus b) { + if (mp.containsKey(a)) { + HashMap<Integer, ActStatus> h = mp.get(a); + h.put(event, b); + mp.put(a, h); + } else { + HashMap<Integer, ActStatus> h = new HashMap<Integer, ActStatus>(); + h.put(event, b); + mp.put(a, h); + } + } +} + +abstract class ActStatus { + abstract void enter(int e); + + abstract void leave(int e); +} + +class EmptyStatus extends ActStatus { + @Override + void enter(int e) { + } + + @Override + void leave(int e) { + } + +} diff --git a/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/d0e51ef7320d00131249f322b63acde8 b/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/d0e51ef7320d00131249f322b63acde8 new file mode 100644 index 0000000..c2f876b --- /dev/null +++ b/client/.metadata/.plugins/org.eclipse.core.resources/.history/81/d0e51ef7320d00131249f322b63acde8 @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="utf-8"?> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.macaroon.piztor" + android:versionCode="1" + android:versionName="1.0" > + + <uses-sdk + android:minSdkVersion="8" + android:targetSdkVersion="17" /> + + <application + android:allowBackup="true" + android:icon="@drawable/ic_launcher" + android:label="@string/app_name" + android:theme="@style/AppTheme" > + <activity + android:name="com.macaroon.piztor.InitAct" + android:label="@string/app_name" > + <intent-filter> + <action android:name="android.intent.action.MAIN" /> + + <category android:name="android.intent.category.LAUNCHER" /> + </intent-filter> + </activity> + <activity + android:name="com.macaroon.piztor.Login" + android:label="@string/title_activity_login" > + </activity> + </application> + +</manifest> |