diff --git a/example/example.xcodeproj/project.pbxproj b/example/example.xcodeproj/project.pbxproj index 4d7c1a7..d9dfcd7 100644 --- a/example/example.xcodeproj/project.pbxproj +++ b/example/example.xcodeproj/project.pbxproj @@ -22,10 +22,10 @@ 397EFC7C1A08E7680009286E /* ofxPiMapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 397EFC7B1A08E7680009286E /* ofxPiMapper.cpp */; }; 397EFC7F1A08FE720009286E /* FboSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 397EFC7D1A08FE720009286E /* FboSource.cpp */; }; 397EFC821A09047C0009286E /* CustomSource.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 397EFC801A09047C0009286E /* CustomSource.cpp */; }; - 39A9AAE01B04E78600AA83BC /* RemoveSurfaceCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AADE1B04E78600AA83BC /* RemoveSurfaceCommand.cpp */; }; - 39A9AAE91B0518FC00AA83BC /* MoveSurfaceCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AAE71B0518FC00AA83BC /* MoveSurfaceCommand.cpp */; }; - 39A9AAEC1B053B4200AA83BC /* SelectSurfaceCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AAEA1B053B4200AA83BC /* SelectSurfaceCommand.cpp */; }; - 39A9AAF21B054FC300AA83BC /* MoveSurfaceVertexCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AAF01B054FC300AA83BC /* MoveSurfaceVertexCommand.cpp */; }; + 39A9AAE01B04E78600AA83BC /* RmSurfaceCmd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AADE1B04E78600AA83BC /* RmSurfaceCmd.cpp */; }; + 39A9AAE91B0518FC00AA83BC /* MvSurfaceCmd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AAE71B0518FC00AA83BC /* MvSurfaceCmd.cpp */; }; + 39A9AAEC1B053B4200AA83BC /* SelSurfaceCmd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AAEA1B053B4200AA83BC /* SelSurfaceCmd.cpp */; }; + 39A9AAF21B054FC300AA83BC /* MvSurfaceVertCmd.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39A9AAF01B054FC300AA83BC /* MvSurfaceVertCmd.cpp */; }; 39C1243319EE9589005DF557 /* lz4.c in Sources */ = {isa = PBXBuildFile; fileRef = 39C123EA19EE9589005DF557 /* lz4.c */; }; 39C1243419EE9589005DF557 /* Base64Encoding.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C1241219EE9589005DF557 /* Base64Encoding.cpp */; }; 39C1243519EE9589005DF557 /* ByteBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C1241319EE9589005DF557 /* ByteBuffer.cpp */; }; @@ -67,9 +67,7 @@ 39C1248119F187D5005DF557 /* TextureEditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C1247A19F187D5005DF557 /* TextureEditor.cpp */; }; 39C1248819F1EB75005DF557 /* SurfaceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C1248319F1EB75005DF557 /* SurfaceManager.cpp */; }; 39C1248919F1EB75005DF557 /* SurfaceManagerGui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C1248519F1EB75005DF557 /* SurfaceManagerGui.cpp */; }; - 39C787BD1AC2111B00691393 /* CommandManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C787BC1AC2111B00691393 /* CommandManager.cpp */; }; - 39C787C11AC2BBAE00691393 /* TestUndoCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C787BF1AC2BBAE00691393 /* TestUndoCommand.cpp */; }; - 39FDD9EE1AC00EAE00262205 /* TestCommand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39FDD9EC1AC00EAE00262205 /* TestCommand.cpp */; }; + 39C787BD1AC2111B00691393 /* CmdManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 39C787BC1AC2111B00691393 /* CmdManager.cpp */; }; BBAB23CB13894F3D00AA2426 /* GLUT.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = BBAB23BE13894E4700AA2426 /* GLUT.framework */; }; E4328149138ABC9F0047C5CB /* openFrameworksDebug.a in Frameworks */ = {isa = PBXBuildFile; fileRef = E4328148138ABC890047C5CB /* openFrameworksDebug.a */; }; E45BE97B0E8CC7DD009D7055 /* AGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E45BE9710E8CC7DD009D7055 /* AGL.framework */; }; @@ -151,14 +149,14 @@ 397EFC7E1A08FE720009286E /* FboSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FboSource.h; sourceTree = ""; }; 397EFC801A09047C0009286E /* CustomSource.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CustomSource.cpp; sourceTree = ""; }; 397EFC811A09047C0009286E /* CustomSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomSource.h; sourceTree = ""; }; - 39A9AADE1B04E78600AA83BC /* RemoveSurfaceCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RemoveSurfaceCommand.cpp; path = Commands/RemoveSurfaceCommand.cpp; sourceTree = ""; }; - 39A9AADF1B04E78600AA83BC /* RemoveSurfaceCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RemoveSurfaceCommand.h; path = Commands/RemoveSurfaceCommand.h; sourceTree = ""; }; - 39A9AAE71B0518FC00AA83BC /* MoveSurfaceCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MoveSurfaceCommand.cpp; path = Commands/MoveSurfaceCommand.cpp; sourceTree = ""; }; - 39A9AAE81B0518FC00AA83BC /* MoveSurfaceCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MoveSurfaceCommand.h; path = Commands/MoveSurfaceCommand.h; sourceTree = ""; }; - 39A9AAEA1B053B4200AA83BC /* SelectSurfaceCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelectSurfaceCommand.cpp; path = Commands/SelectSurfaceCommand.cpp; sourceTree = ""; }; - 39A9AAEB1B053B4200AA83BC /* SelectSurfaceCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SelectSurfaceCommand.h; path = Commands/SelectSurfaceCommand.h; sourceTree = ""; }; - 39A9AAF01B054FC300AA83BC /* MoveSurfaceVertexCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MoveSurfaceVertexCommand.cpp; path = Commands/MoveSurfaceVertexCommand.cpp; sourceTree = ""; }; - 39A9AAF11B054FC300AA83BC /* MoveSurfaceVertexCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MoveSurfaceVertexCommand.h; path = Commands/MoveSurfaceVertexCommand.h; sourceTree = ""; }; + 39A9AADE1B04E78600AA83BC /* RmSurfaceCmd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RmSurfaceCmd.cpp; path = Commands/RmSurfaceCmd.cpp; sourceTree = ""; }; + 39A9AADF1B04E78600AA83BC /* RmSurfaceCmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RmSurfaceCmd.h; path = Commands/RmSurfaceCmd.h; sourceTree = ""; }; + 39A9AAE71B0518FC00AA83BC /* MvSurfaceCmd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MvSurfaceCmd.cpp; path = Commands/MvSurfaceCmd.cpp; sourceTree = ""; }; + 39A9AAE81B0518FC00AA83BC /* MvSurfaceCmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MvSurfaceCmd.h; path = Commands/MvSurfaceCmd.h; sourceTree = ""; }; + 39A9AAEA1B053B4200AA83BC /* SelSurfaceCmd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SelSurfaceCmd.cpp; path = Commands/SelSurfaceCmd.cpp; sourceTree = ""; }; + 39A9AAEB1B053B4200AA83BC /* SelSurfaceCmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SelSurfaceCmd.h; path = Commands/SelSurfaceCmd.h; sourceTree = ""; }; + 39A9AAF01B054FC300AA83BC /* MvSurfaceVertCmd.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MvSurfaceVertCmd.cpp; path = Commands/MvSurfaceVertCmd.cpp; sourceTree = ""; }; + 39A9AAF11B054FC300AA83BC /* MvSurfaceVertCmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MvSurfaceVertCmd.h; path = Commands/MvSurfaceVertCmd.h; sourceTree = ""; }; 39C123E719EE9589005DF557 /* alphanum.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = alphanum.hpp; sourceTree = ""; }; 39C123EA19EE9589005DF557 /* lz4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = lz4.c; sourceTree = ""; }; 39C123EB19EE9589005DF557 /* lz4.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lz4.h; sourceTree = ""; }; @@ -261,13 +259,9 @@ 39C1248519F1EB75005DF557 /* SurfaceManagerGui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SurfaceManagerGui.cpp; sourceTree = ""; }; 39C1248619F1EB75005DF557 /* SurfaceManagerGui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurfaceManagerGui.h; sourceTree = ""; }; 39C1248719F1EB75005DF557 /* SurfaceType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SurfaceType.h; sourceTree = ""; }; - 39C787BB1AC20D2400691393 /* CommandManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CommandManager.h; path = Commands/CommandManager.h; sourceTree = ""; }; - 39C787BC1AC2111B00691393 /* CommandManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CommandManager.cpp; path = Commands/CommandManager.cpp; sourceTree = ""; }; - 39C787BF1AC2BBAE00691393 /* TestUndoCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestUndoCommand.cpp; path = Commands/TestUndoCommand.cpp; sourceTree = ""; }; - 39C787C01AC2BBAE00691393 /* TestUndoCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUndoCommand.h; path = Commands/TestUndoCommand.h; sourceTree = ""; }; - 39FDD9EA1AC007BF00262205 /* BaseCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BaseCommand.h; path = Commands/BaseCommand.h; sourceTree = ""; }; - 39FDD9EC1AC00EAE00262205 /* TestCommand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TestCommand.cpp; path = Commands/TestCommand.cpp; sourceTree = ""; }; - 39FDD9ED1AC00EAE00262205 /* TestCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestCommand.h; path = Commands/TestCommand.h; sourceTree = ""; }; + 39C787BB1AC20D2400691393 /* CmdManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CmdManager.h; path = Commands/CmdManager.h; sourceTree = ""; }; + 39C787BC1AC2111B00691393 /* CmdManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CmdManager.cpp; path = Commands/CmdManager.cpp; sourceTree = ""; }; + 39FDD9EA1AC007BF00262205 /* BaseCmd.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BaseCmd.h; path = Commands/BaseCmd.h; sourceTree = ""; }; BBAB23BE13894E4700AA2426 /* GLUT.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GLUT.framework; path = ../../../libs/glut/lib/osx/GLUT.framework; sourceTree = ""; }; E4328143138ABC890047C5CB /* openFrameworksLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = openFrameworksLib.xcodeproj; path = ../../../libs/openFrameworksCompiled/project/osx/openFrameworksLib.xcodeproj; sourceTree = SOURCE_ROOT; }; E45BE9710E8CC7DD009D7055 /* AGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AGL.framework; path = /System/Library/Frameworks/AGL.framework; sourceTree = ""; }; @@ -615,17 +609,17 @@ 39C1246219F0AB96005DF557 /* Surfaces */ = { isa = PBXGroup; children = ( - 39C1248319F1EB75005DF557 /* SurfaceManager.cpp */, 39C1248419F1EB75005DF557 /* SurfaceManager.h */, - 39C1248519F1EB75005DF557 /* SurfaceManagerGui.cpp */, + 39C1248319F1EB75005DF557 /* SurfaceManager.cpp */, 39C1248619F1EB75005DF557 /* SurfaceManagerGui.h */, + 39C1248519F1EB75005DF557 /* SurfaceManagerGui.cpp */, 39C1248719F1EB75005DF557 /* SurfaceType.h */, - 39C1246319F0AB96005DF557 /* BaseSurface.cpp */, 39C1246419F0AB96005DF557 /* BaseSurface.h */, - 39C1246519F0AB96005DF557 /* QuadSurface.cpp */, + 39C1246319F0AB96005DF557 /* BaseSurface.cpp */, 39C1246619F0AB96005DF557 /* QuadSurface.h */, - 39C1246719F0AB96005DF557 /* TriangleSurface.cpp */, + 39C1246519F0AB96005DF557 /* QuadSurface.cpp */, 39C1246819F0AB96005DF557 /* TriangleSurface.h */, + 39C1246719F0AB96005DF557 /* TriangleSurface.cpp */, ); path = Surfaces; sourceTree = ""; @@ -633,20 +627,20 @@ 39C1246D19F187D5005DF557 /* UserInterface */ = { isa = PBXGroup; children = ( - 39C1246E19F187D5005DF557 /* BaseJoint.cpp */, 39C1246F19F187D5005DF557 /* BaseJoint.h */, - 39C1247019F187D5005DF557 /* CircleJoint.cpp */, + 39C1246E19F187D5005DF557 /* BaseJoint.cpp */, 39C1247119F187D5005DF557 /* CircleJoint.h */, + 39C1247019F187D5005DF557 /* CircleJoint.cpp */, 39C1247219F187D5005DF557 /* EditorType.h */, 39C1247319F187D5005DF557 /* GuiMode.h */, - 39C1247419F187D5005DF557 /* ProjectionEditor.cpp */, 39C1247519F187D5005DF557 /* ProjectionEditor.h */, - 39C1247619F187D5005DF557 /* RadioList.cpp */, + 39C1247419F187D5005DF557 /* ProjectionEditor.cpp */, 39C1247719F187D5005DF557 /* RadioList.h */, - 39C1247819F187D5005DF557 /* SourcesEditor.cpp */, + 39C1247619F187D5005DF557 /* RadioList.cpp */, 39C1247919F187D5005DF557 /* SourcesEditor.h */, - 39C1247A19F187D5005DF557 /* TextureEditor.cpp */, + 39C1247819F187D5005DF557 /* SourcesEditor.cpp */, 39C1247B19F187D5005DF557 /* TextureEditor.h */, + 39C1247A19F187D5005DF557 /* TextureEditor.cpp */, ); path = UserInterface; sourceTree = ""; @@ -654,21 +648,17 @@ 39FDD9E81AC0076200262205 /* Commands */ = { isa = PBXGroup; children = ( - 39A9AAF01B054FC300AA83BC /* MoveSurfaceVertexCommand.cpp */, - 39A9AAF11B054FC300AA83BC /* MoveSurfaceVertexCommand.h */, - 39A9AAEA1B053B4200AA83BC /* SelectSurfaceCommand.cpp */, - 39A9AAEB1B053B4200AA83BC /* SelectSurfaceCommand.h */, - 39A9AAE71B0518FC00AA83BC /* MoveSurfaceCommand.cpp */, - 39A9AAE81B0518FC00AA83BC /* MoveSurfaceCommand.h */, - 39A9AADF1B04E78600AA83BC /* RemoveSurfaceCommand.h */, - 39A9AADE1B04E78600AA83BC /* RemoveSurfaceCommand.cpp */, - 39FDD9EA1AC007BF00262205 /* BaseCommand.h */, - 39C787BB1AC20D2400691393 /* CommandManager.h */, - 39C787BC1AC2111B00691393 /* CommandManager.cpp */, - 39FDD9ED1AC00EAE00262205 /* TestCommand.h */, - 39FDD9EC1AC00EAE00262205 /* TestCommand.cpp */, - 39C787C01AC2BBAE00691393 /* TestUndoCommand.h */, - 39C787BF1AC2BBAE00691393 /* TestUndoCommand.cpp */, + 39FDD9EA1AC007BF00262205 /* BaseCmd.h */, + 39C787BB1AC20D2400691393 /* CmdManager.h */, + 39C787BC1AC2111B00691393 /* CmdManager.cpp */, + 39A9AAF11B054FC300AA83BC /* MvSurfaceVertCmd.h */, + 39A9AAF01B054FC300AA83BC /* MvSurfaceVertCmd.cpp */, + 39A9AAEB1B053B4200AA83BC /* SelSurfaceCmd.h */, + 39A9AAEA1B053B4200AA83BC /* SelSurfaceCmd.cpp */, + 39A9AAE81B0518FC00AA83BC /* MvSurfaceCmd.h */, + 39A9AAE71B0518FC00AA83BC /* MvSurfaceCmd.cpp */, + 39A9AADF1B04E78600AA83BC /* RmSurfaceCmd.h */, + 39A9AADE1B04E78600AA83BC /* RmSurfaceCmd.cpp */, ); name = Commands; sourceTree = ""; @@ -852,7 +842,7 @@ buildActionMask = 2147483647; files = ( 3933D5D819BB87BD000ACA55 /* ofxSlider.cpp in Sources */, - 39C787BD1AC2111B00691393 /* CommandManager.cpp in Sources */, + 39C787BD1AC2111B00691393 /* CmdManager.cpp in Sources */, 39C1247E19F187D5005DF557 /* ProjectionEditor.cpp in Sources */, 39C1244619EE9589005DF557 /* RecursiveDirectoryIteratorStategies.cpp in Sources */, 39C1243A19EE9589005DF557 /* Compression.cpp in Sources */, @@ -869,20 +859,18 @@ 397EFC7F1A08FE720009286E /* FboSource.cpp in Sources */, E4B69E200A3A1BDC003C02F2 /* main.cpp in Sources */, 39C1244719EE9589005DF557 /* RegexPathFilter.cpp in Sources */, - 39C787C11AC2BBAE00691393 /* TestUndoCommand.cpp in Sources */, - 39A9AAE91B0518FC00AA83BC /* MoveSurfaceCommand.cpp in Sources */, + 39A9AAE91B0518FC00AA83BC /* MvSurfaceCmd.cpp in Sources */, 39C1247C19F187D5005DF557 /* BaseJoint.cpp in Sources */, - 39FDD9EE1AC00EAE00262205 /* TestCommand.cpp in Sources */, 39C1245219EE95DD005DF557 /* MediaServer.cpp in Sources */, 39C1243D19EE9589005DF557 /* DirectoryUtils.cpp in Sources */, 39264843192224F90008A7F5 /* tinyxmlparser.cpp in Sources */, 3933D5D419BB87BD000ACA55 /* ofxButton.cpp in Sources */, - 39A9AAE01B04E78600AA83BC /* RemoveSurfaceCommand.cpp in Sources */, + 39A9AAE01B04E78600AA83BC /* RmSurfaceCmd.cpp in Sources */, 39C1244519EE9589005DF557 /* RecursiveDirectoryIterator.cpp in Sources */, 39C1243919EE9589005DF557 /* COBSEncoding.cpp in Sources */, 39C1244919EE9589005DF557 /* snappy-sinksource.cc in Sources */, 39C1248819F1EB75005DF557 /* SurfaceManager.cpp in Sources */, - 39A9AAF21B054FC300AA83BC /* MoveSurfaceVertexCommand.cpp in Sources */, + 39A9AAF21B054FC300AA83BC /* MvSurfaceVertCmd.cpp in Sources */, 39C1244319EE9589005DF557 /* LinkFilter.cpp in Sources */, 39C1245919F086A9005DF557 /* BaseSource.cpp in Sources */, 39C1244019EE9589005DF557 /* FileExtensionFilter.cpp in Sources */, @@ -901,7 +889,7 @@ 39C1243519EE9589005DF557 /* ByteBuffer.cpp in Sources */, 39C1246B19F0AB96005DF557 /* TriangleSurface.cpp in Sources */, 39C1244419EE9589005DF557 /* PathFilterCollection.cpp in Sources */, - 39A9AAEC1B053B4200AA83BC /* SelectSurfaceCommand.cpp in Sources */, + 39A9AAEC1B053B4200AA83BC /* SelSurfaceCmd.cpp in Sources */, 39C1243319EE9589005DF557 /* lz4.c in Sources */, 39C1243B19EE9589005DF557 /* DeviceFilter.cpp in Sources */, 39C1243E19EE9589005DF557 /* DirectoryWatcher.cpp in Sources */, diff --git a/src/Commands/BaseCommand.h b/src/Commands/BaseCmd.h similarity index 75% rename from src/Commands/BaseCommand.h rename to src/Commands/BaseCmd.h index 59a1255..353b27d 100644 --- a/src/Commands/BaseCommand.h +++ b/src/Commands/BaseCmd.h @@ -13,9 +13,9 @@ namespace ofx{ namespace piMapper{ // Base class for all commands - class BaseCommand{ + class BaseCmd{ public: - virtual ~BaseCommand(){}; + virtual ~BaseCmd(){}; virtual void exec() = 0; // By default a command is not undo @@ -24,24 +24,18 @@ namespace ofx{ protected: // In order to avoid using this class directly, // we make the constructor protected. - BaseCommand(){}; + BaseCmd(){}; }; // Base class for all undoable commands - class BaseUndoableCommand : public BaseCommand{ + class BaseUndoCmd : public BaseCmd{ public: virtual void undo() = 0; virtual bool isUndoable(){return true;} protected: - BaseUndoableCommand(){}; + BaseUndoCmd(){}; }; } // namespace piMapper } // namespace ofx - -// Ideas for command classes -// SelectSurfaceCommand -// MoveSurfaceCommand -// SelectSourceMapCommand -// MoveSourceMapCommand diff --git a/src/Commands/CmdManager.cpp b/src/Commands/CmdManager.cpp new file mode 100644 index 0000000..1562b36 --- /dev/null +++ b/src/Commands/CmdManager.cpp @@ -0,0 +1,28 @@ +#include "CmdManager.h" + +namespace ofx{ + namespace piMapper{ + + void CmdManager::exec(BaseCmd * cmd){ + cmd->exec(); + if (cmd->isUndoable()){ + cmdStack.push_back(static_cast(cmd)); + } + } + + void CmdManager::undo(){ + ofLogNotice("CmdManager", "undo"); + if (cmdStack.size() > 0){ + BaseUndoCmd * cmd = cmdStack.back(); + cmd->undo(); + + // Delete last command now, change this when implementing redo. + delete cmdStack.back(); + cmdStack.pop_back(); + } else { + ofLogNotice("CmdManager", "Nothing to undo"); + } + } + + } // namespace piMapper +} // namespace ofx \ No newline at end of file diff --git a/src/Commands/CommandManager.h b/src/Commands/CmdManager.h similarity index 56% rename from src/Commands/CommandManager.h rename to src/Commands/CmdManager.h index 56512d9..c5e7549 100644 --- a/src/Commands/CommandManager.h +++ b/src/Commands/CmdManager.h @@ -1,19 +1,19 @@ #pragma once #import -#import "BaseCommand.h" +#import "BaseCmd.h" #import "ofLog.h" namespace ofx{ namespace piMapper{ - class CommandManager{ + class CmdManager{ public: - void exec(BaseCommand * cmd); + void exec(BaseCmd * cmd); void undo(); private: - std::vector commandStack; + std::vector cmdStack; }; } // namespace piMapper diff --git a/src/Commands/CommandManager.cpp b/src/Commands/CommandManager.cpp deleted file mode 100644 index d5ff90d..0000000 --- a/src/Commands/CommandManager.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include "CommandManager.h" - -namespace ofx{ - namespace piMapper{ - - void CommandManager::exec(BaseCommand * cmd){ - cmd->exec(); - if (cmd->isUndoable()){ - commandStack.push_back(static_cast(cmd)); - } - } - - void CommandManager::undo(){ - ofLogNotice("CommandManager", "undo"); - if (commandStack.size() > 0){ - BaseUndoableCommand * cmd = commandStack.back(); - cmd->undo(); - - // Delete last command now, change this when implementing redo. - delete commandStack.back(); - commandStack.pop_back(); - } else { - ofLogNotice("CommandManager", "Nothing to undo"); - } - } - - } // namespace piMapper -} // namespace ofx \ No newline at end of file diff --git a/src/Commands/MoveSurfaceCommand.cpp b/src/Commands/MvSurfaceCmd.cpp similarity index 69% rename from src/Commands/MoveSurfaceCommand.cpp rename to src/Commands/MvSurfaceCmd.cpp index 8a53549..366edda 100644 --- a/src/Commands/MoveSurfaceCommand.cpp +++ b/src/Commands/MvSurfaceCmd.cpp @@ -1,9 +1,9 @@ -#include "MoveSurfaceCommand.h" +#include "MvSurfaceCmd.h" namespace ofx{ namespace piMapper{ - MoveSurfaceCommand::MoveSurfaceCommand( + MvSurfaceCmd::MvSurfaceCmd( BaseSurface * surface, ProjectionEditor * projectionEditor){ @@ -11,14 +11,14 @@ namespace ofx{ _projectionEditor = projectionEditor; } - void MoveSurfaceCommand::exec(){ - ofLogNotice("MoveSurfaceCommand", "exec"); + void MvSurfaceCmd::exec(){ + ofLogNotice("MvSurfaceCmd", "exec"); _previousVertices = _surface->getVertices(); _surface->setMoved(false); } - void MoveSurfaceCommand::undo(){ - ofLogNotice("MoveSurfaceCommand", "undo"); + void MvSurfaceCmd::undo(){ + ofLogNotice("MvSurfaceCmd", "undo"); _surface->moveBy(_previousVertices[0] - _surface->getVertices()[0]); _projectionEditor->updateJoints(); _previousVertices.clear(); diff --git a/src/Commands/MoveSurfaceCommand.h b/src/Commands/MvSurfaceCmd.h similarity index 81% rename from src/Commands/MoveSurfaceCommand.h rename to src/Commands/MvSurfaceCmd.h index 38a7cd3..0c4d72a 100644 --- a/src/Commands/MoveSurfaceCommand.h +++ b/src/Commands/MvSurfaceCmd.h @@ -1,20 +1,20 @@ -// MoveSurfaceCommand +// MvSurfaceCmd // Provides with option to undo move surface operation. // Created by Krisjanis Rijnieks 2015-05-14 #pragma once -#include "BaseCommand.h" +#include "BaseCmd.h" #include "BaseSurface.h" #include "ProjectionEditor.h" namespace ofx{ namespace piMapper{ - class MoveSurfaceCommand : public BaseUndoableCommand{ + class MvSurfaceCmd : public BaseUndoCmd{ public: - MoveSurfaceCommand( + MvSurfaceCmd( BaseSurface * surface, ProjectionEditor * projectionEditor); void exec(); diff --git a/src/Commands/MoveSurfaceVertexCommand.cpp b/src/Commands/MvSurfaceVertCmd.cpp similarity index 67% rename from src/Commands/MoveSurfaceVertexCommand.cpp rename to src/Commands/MvSurfaceVertCmd.cpp index de48986..74abe6d 100644 --- a/src/Commands/MoveSurfaceVertexCommand.cpp +++ b/src/Commands/MvSurfaceVertCmd.cpp @@ -1,9 +1,9 @@ -#include "MoveSurfaceVertexCommand.h" +#include "MvSurfaceVertCmd.h" namespace ofx{ namespace piMapper{ - MoveSurfaceVertexCommand::MoveSurfaceVertexCommand( + MvSurfaceVertCmd::MvSurfaceVertCmd( int vertIndex, BaseSurface * surface, ProjectionEditor * projectionEditor){ @@ -13,13 +13,13 @@ namespace ofx{ _projectionEditor = projectionEditor; } - void MoveSurfaceVertexCommand::exec(){ - ofLogNotice("MoveJointCommand", "exec"); + void MvSurfaceVertCmd::exec(){ + ofLogNotice("MvSurfaceVertCommand", "exec"); _prevVertPos = _surface->getVertices()[_vertIndex]; } - void MoveSurfaceVertexCommand::undo(){ - ofLogNotice("MoveJointCommand", "undo"); + void MvSurfaceVertCmd::undo(){ + ofLogNotice("MvSurfaceVertCommand", "undo"); _surface->setVertex(_vertIndex, _prevVertPos); _projectionEditor->updateJoints(); _projectionEditor = 0; diff --git a/src/Commands/MoveSurfaceVertexCommand.h b/src/Commands/MvSurfaceVertCmd.h similarity index 81% rename from src/Commands/MoveSurfaceVertexCommand.h rename to src/Commands/MvSurfaceVertCmd.h index 204e255..f2458dd 100644 --- a/src/Commands/MoveSurfaceVertexCommand.h +++ b/src/Commands/MvSurfaceVertCmd.h @@ -1,10 +1,10 @@ -// MoveSurfaceVertexCommand +// MvSurfaceVertCmd // Provides with option to undo move surface vertex operation. // Created by Krisjanis Rijnieks 2015-05-15 #pragma once -#include "BaseCommand.h" +#include "BaseCmd.h" #include "BaseSurface.h" #include "ProjectionEditor.h" #include "BaseJoint.h" @@ -12,10 +12,10 @@ namespace ofx{ namespace piMapper{ - class MoveSurfaceVertexCommand : public BaseUndoableCommand{ + class MvSurfaceVertCmd : public BaseUndoCmd{ public: - MoveSurfaceVertexCommand( + MvSurfaceVertCmd( int vertIndex, BaseSurface * surface, ProjectionEditor * projectionEditor); diff --git a/src/Commands/RemoveSurfaceCommand.cpp b/src/Commands/RmSurfaceCmd.cpp similarity index 66% rename from src/Commands/RemoveSurfaceCommand.cpp rename to src/Commands/RmSurfaceCmd.cpp index 71e6512..357e618 100644 --- a/src/Commands/RemoveSurfaceCommand.cpp +++ b/src/Commands/RmSurfaceCmd.cpp @@ -1,24 +1,24 @@ -#include "RemoveSurfaceCommand.h" +#include "RmSurfaceCmd.h" namespace ofx{ namespace piMapper{ - RemoveSurfaceCommand::RemoveSurfaceCommand(ofxPiMapper * app){ + RmSurfaceCmd::RmSurfaceCmd(ofxPiMapper * app){ _app = app; _surface = 0; } - void RemoveSurfaceCommand::exec(){ + void RmSurfaceCmd::exec(){ // Store the surface, this implies that the surfaceManager's // removeSelectedSurface does not destroy the surface. _surface = _app->surfaceManager.getSelectedSurface(); _app->surfaceManager.removeSelectedSurface(); } - void RemoveSurfaceCommand::undo(){ - ofLogNotice("RemoveSurfaceCommand", "undo"); + void RmSurfaceCmd::undo(){ + ofLogNotice("RmSurfaceCmd", "undo"); if (_surface == 0) { - ofLogError("RemoveSurfaceCommand", "No surface stored"); + ofLogError("RmSurfaceCmd", "No surface stored"); } _app->surfaceManager.addSurface(_surface); _app->surfaceManager.selectSurface(_surface); diff --git a/src/Commands/RemoveSurfaceCommand.h b/src/Commands/RmSurfaceCmd.h similarity index 74% rename from src/Commands/RemoveSurfaceCommand.h rename to src/Commands/RmSurfaceCmd.h index 4e10077..7fd746d 100644 --- a/src/Commands/RemoveSurfaceCommand.h +++ b/src/Commands/RmSurfaceCmd.h @@ -1,11 +1,11 @@ -// RemoveSurfaceCommand +// RmSurfaceCmd // Provides with option to undo remove surface operation. // Created by Krisjanis Rijnieks 2015-05-14 #pragma once #include "ofxPiMapper.h" -#include "BaseCommand.h" +#include "BaseCmd.h" #include "BaseSurface.h" class ofxPiMapper; @@ -13,10 +13,10 @@ class ofxPiMapper; namespace ofx{ namespace piMapper{ - class RemoveSurfaceCommand : public BaseUndoableCommand{ + class RmSurfaceCmd : public BaseUndoCmd{ public: - RemoveSurfaceCommand(ofxPiMapper * app); + RmSurfaceCmd(ofxPiMapper * app); void exec(); void undo(); diff --git a/src/Commands/SelectSurfaceCommand.cpp b/src/Commands/SelSurfaceCmd.cpp similarity index 79% rename from src/Commands/SelectSurfaceCommand.cpp rename to src/Commands/SelSurfaceCmd.cpp index d8060cd..91d8afc 100644 --- a/src/Commands/SelectSurfaceCommand.cpp +++ b/src/Commands/SelSurfaceCmd.cpp @@ -1,9 +1,9 @@ -#include "SelectSurfaceCommand.h" +#include "SelSurfaceCmd.h" namespace ofx{ namespace piMapper{ - SelectSurfaceCommand::SelectSurfaceCommand( + SelSurfaceCmd::SelSurfaceCmd( SurfaceManager * surfaceManager, BaseSurface * surfaceToSelect, ProjectionEditor * projectionEditor){ @@ -13,15 +13,15 @@ namespace ofx{ _projectionEditor = projectionEditor; } - void SelectSurfaceCommand::exec(){ + void SelSurfaceCmd::exec(){ _prevSelectedSurface = _surfaceManager->getSelectedSurface(); _projectionEditor->clearJoints(); _surfaceManager->selectSurface(_surfaceToSelect); _projectionEditor->createJoints(); } - void SelectSurfaceCommand::undo(){ - ofLogNotice("SelectSurfaceCommand", "undo"); + void SelSurfaceCmd::undo(){ + ofLogNotice("SelSurfaceCmd", "undo"); _projectionEditor->clearJoints(); _surfaceManager->selectSurface(_prevSelectedSurface); _projectionEditor->createJoints(); diff --git a/src/Commands/SelectSurfaceCommand.h b/src/Commands/SelSurfaceCmd.h similarity index 83% rename from src/Commands/SelectSurfaceCommand.h rename to src/Commands/SelSurfaceCmd.h index 1bba6ef..94f0798 100644 --- a/src/Commands/SelectSurfaceCommand.h +++ b/src/Commands/SelSurfaceCmd.h @@ -1,10 +1,10 @@ -// SelectSurfaceCommand +// SelSurfaceCmd // Provides with option to undo select surface operation. // Created by Krisjanis Rijnieks 2015-05-14 #pragma once -#include "BaseCommand.h" +#include "BaseCmd.h" #include "BaseSurface.h" #include "SurfaceManager.h" #include "ProjectionEditor.h" @@ -12,10 +12,10 @@ namespace ofx{ namespace piMapper{ - class SelectSurfaceCommand : public BaseUndoableCommand{ + class SelSurfaceCmd : public BaseUndoCmd{ public: - SelectSurfaceCommand( + SelSurfaceCmd( SurfaceManager * surfaceManager, BaseSurface * surfaceToSelect, ProjectionEditor * projectionEditor); diff --git a/src/Commands/TestCommand.cpp b/src/Commands/TestCommand.cpp deleted file mode 100644 index 98ec752..0000000 --- a/src/Commands/TestCommand.cpp +++ /dev/null @@ -1,17 +0,0 @@ -# include "TestCommand.h" - -namespace ofx{ - namespace piMapper{ - - TestCommand::TestCommand(ofxPiMapper * a){ - _application = a; - } - - void TestCommand::exec(){ - string name = "Hugo"; - _application->testCommand(name); - } - - } // namespace piMapper -} // namespace ofx - diff --git a/src/Commands/TestCommand.h b/src/Commands/TestCommand.h deleted file mode 100644 index 747e062..0000000 --- a/src/Commands/TestCommand.h +++ /dev/null @@ -1,27 +0,0 @@ -// TestCommand class, extends Command base class. Used for Command design pattern implementation -// pre-tests. Will be removed as soon as possible. -// Created by Krisjanis Rijnieks 2015-03-23 - -#pragma once - -#include "ofxPiMapper.h" -#include "BaseCommand.h" - -class ofxPiMapper; - -namespace ofx{ - namespace piMapper{ - - class TestCommand : public BaseCommand{ - - public: - TestCommand(ofxPiMapper * a); - void exec(); - - private: - ofxPiMapper * _application; - }; - - } // namespace piMapper -} // namespace ofx - diff --git a/src/Commands/TestUndoCommand.cpp b/src/Commands/TestUndoCommand.cpp deleted file mode 100644 index 6434719..0000000 --- a/src/Commands/TestUndoCommand.cpp +++ /dev/null @@ -1,21 +0,0 @@ -#include "TestUndoCommand.h" - -namespace ofx{ - namespace piMapper{ - - TestUndoCommand::TestUndoCommand(ofxPiMapper * a){ - _application = a; - } - - void TestUndoCommand::exec(){ - increase = 2; - _application->testUndoableCommand(increase); - } - - void TestUndoCommand::undo(){ - _application->testUndoableCommand(-increase); - } - - } // namespace piMapper -} // namespace ofx - diff --git a/src/Commands/TestUndoCommand.h b/src/Commands/TestUndoCommand.h deleted file mode 100644 index 283a4ad..0000000 --- a/src/Commands/TestUndoCommand.h +++ /dev/null @@ -1,27 +0,0 @@ -// Created by Krisjanis Rijnieks 2015-03-25 - -#pragma once - -#include "ofxPiMapper.h" -#include "BaseCommand.h" - -class ofxPiMapper; - -namespace ofx{ - namespace piMapper{ - - class TestUndoCommand : public BaseUndoableCommand{ - - public: - TestUndoCommand(ofxPiMapper * a); - void exec(); - void undo(); - - private: - ofxPiMapper * _application; - int increase; - }; - - } // namespace piMapper -} // namespace ofx - diff --git a/src/Surfaces/SurfaceManagerGui.cpp b/src/Surfaces/SurfaceManagerGui.cpp index 677cd53..88c340a 100644 --- a/src/Surfaces/SurfaceManagerGui.cpp +++ b/src/Surfaces/SurfaceManagerGui.cpp @@ -8,13 +8,13 @@ namespace ofx { bDrag = false; registerMouseEvents(); ofHideCursor(); - _commandManager = 0; + _cmdManager = 0; } SurfaceManagerGui::~SurfaceManagerGui() { unregisterMouseEvents(); surfaceManager = NULL; - _commandManager = 0; + _cmdManager = 0; } void SurfaceManagerGui::registerMouseEvents() { @@ -123,7 +123,7 @@ namespace ofx { break; } } - _commandManager->exec(new MoveSurfaceVertexCommand( + _cmdManager->exec(new MvSurfaceVertCmd( jointVertIndex, surfaceManager->getSelectedSurface(), &projectionEditor)); @@ -138,7 +138,7 @@ namespace ofx { // Do not repeat this command if attempting to select an // already selected surface. if (surfaceManager->getSelectedSurface() != surfaceManager->getSurface(i)){ - _commandManager->exec(new SelectSurfaceCommand( + _cmdManager->exec(new SelSurfaceCmd( surfaceManager, surfaceManager->getSurface(i), &projectionEditor)); @@ -157,8 +157,8 @@ namespace ofx { clickPosition = ofVec2f(args.x, args.y); startDrag(); - _commandManager->exec( - new MoveSurfaceCommand( + _cmdManager->exec( + new MvSurfaceCmd( surfaceManager->getSelectedSurface(), &projectionEditor)); } @@ -179,7 +179,7 @@ namespace ofx { // Check if surface has moved if (!surfaceManager->getSelectedSurface()->getMoved()) { - _commandManager->undo(); + _cmdManager->undo(); } } @@ -212,8 +212,8 @@ namespace ofx { sourcesEditor.setMediaServer(mediaServer); } - void SurfaceManagerGui::setCommandManager(CommandManager * commandManager){ - _commandManager = commandManager; + void SurfaceManagerGui::setCmdManager(CmdManager * cmdManager){ + _cmdManager = cmdManager; } void SurfaceManagerGui::setMode(int newGuiMode) { diff --git a/src/Surfaces/SurfaceManagerGui.h b/src/Surfaces/SurfaceManagerGui.h index 758a2d8..64c09a3 100644 --- a/src/Surfaces/SurfaceManagerGui.h +++ b/src/Surfaces/SurfaceManagerGui.h @@ -11,10 +11,10 @@ #include "ProjectionEditor.h" #include "SourcesEditor.h" #include "GuiMode.h" -#include "CommandManager.h" -#include "MoveSurfaceCommand.h" -#include "SelectSurfaceCommand.h" -#include "MoveSurfaceVertexCommand.h" +#include "CmdManager.h" +#include "MvSurfaceCmd.h" +#include "SelSurfaceCmd.h" +#include "MvSurfaceVertCmd.h" namespace ofx { namespace piMapper { @@ -33,7 +33,7 @@ namespace ofx { void setSurfaceManager(SurfaceManager* newSurfaceManager); void setMediaServer(MediaServer* newMediaServer); - void setCommandManager(CommandManager * commandManager); + void setCmdManager(CmdManager * cmdManager); void setMode(int newGuiMode); void drawSelectedSurfaceHighlight(); @@ -50,7 +50,7 @@ namespace ofx { int guiMode; bool bDrag; ofVec2f clickPosition; - CommandManager * _commandManager; + CmdManager * _cmdManager; }; } } \ No newline at end of file diff --git a/src/ofxPiMapper.cpp b/src/ofxPiMapper.cpp index 41ad3e0..402b6be 100644 --- a/src/ofxPiMapper.cpp +++ b/src/ofxPiMapper.cpp @@ -14,7 +14,7 @@ void ofxPiMapper::setup(){ // Assign media server to other pi mapper components surfaceManager.setMediaServer(&mediaServer); gui.setMediaServer(&mediaServer); - gui.setCommandManager(&commandManager); + gui.setCmdManager(&cmdManager); // Check if we have user surfaces defined, if not - load default if (ofFile::doesFileExist(PIMAPPER_USER_SURFACES_XML_FILE)){ @@ -31,9 +31,6 @@ void ofxPiMapper::setup(){ isSetUp = true; ofLogNotice("ofxPiMapper") << "Done setting up"; - - // Initialize undo test vars - undoTestValue = 0; } void ofxPiMapper::draw(){ @@ -102,19 +99,11 @@ void ofxPiMapper::keyPressed(ofKeyEventArgs &args){ surfaceManager.saveXmlSettings(PIMAPPER_USER_SURFACES_XML_FILE); break; case OF_KEY_BACKSPACE: - //surfaceManager.removeSelectedSurface(); - commandManager.exec(new ofx::piMapper::RemoveSurfaceCommand((ofxPiMapper *)this)); - break; - // TODO: Remove the following case when Command test done. - case '9': - commandManager.exec(new ofx::piMapper::TestUndoCommand((ofxPiMapper *)this)); - break; - case '0': - commandManager.exec(new ofx::piMapper::TestCommand((ofxPiMapper *)this)); + cmdManager.exec(new ofx::piMapper::RmSurfaceCmd((ofxPiMapper *)this)); break; case 'z': - // undo - commandManager.undo(); + // Undo any undo command operation + cmdManager.undo(); break; default: break; @@ -175,13 +164,4 @@ ofx::piMapper::MediaServer& ofxPiMapper::getMediaServer(){ ofx::piMapper::SurfaceManager& ofxPiMapper::getSurfaceManager(){ return surfaceManager; -} - -// TODO: remove this when done testing and everything works -void ofxPiMapper::testCommand(string name){ - ofLogNotice("ofxPiMapper", name); -} - -void ofxPiMapper::testUndoableCommand(int increase){ - undoTestValue += increase; } \ No newline at end of file diff --git a/src/ofxPiMapper.h b/src/ofxPiMapper.h index d45b394..7e3ce4c 100644 --- a/src/ofxPiMapper.h +++ b/src/ofxPiMapper.h @@ -12,11 +12,10 @@ #include "MediaServer.h" #include "FboSource.h" -#include "BaseCommand.h" -#include "TestCommand.h" // TODO: Remove this line when done testing -#include "TestUndoCommand.h" -#include "CommandManager.h" -#include "RemoveSurfaceCommand.h" +// Command design pattern includes +#include "BaseCmd.h" +#include "CmdManager.h" +#include "RmSurfaceCmd.h" #define PIMAPPER_DEF_SURFACES_XML_FILE "defaultSurfaces.xml" #define PIMAPPER_USER_SURFACES_XML_FILE "surfaces.xml" @@ -49,12 +48,8 @@ class ofxPiMapper{ // from anywhere within ofxPiMapper. ofx::piMapper::MediaServer& getMediaServer(); ofx::piMapper::SurfaceManager& getSurfaceManager(); - - // Test first steps of the Command design pattern implementation. - void testCommand(string name); - void testUndoableCommand(int increase); - int undoTestValue; - ofx::piMapper::CommandManager commandManager; + + ofx::piMapper::CmdManager cmdManager; ofx::piMapper::SurfaceManager surfaceManager; private: