Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

VEML.hh

00001 /*
00002  * PIAVE - PIAVE Is A Video Editor
00003  *
00004  * Copyright (C) 2002 Rolf Dubitzky, rolf@dubitzky.de
00005  *
00006  */
00007 
00008 /*
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software Foundation,
00021  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
00022  */
00023 
00024 #if ! defined ( VEML_HH )
00025 #define VEML_HH
00026 
00027 // std
00028 #include <sys/types.h>
00029 #include <sys/socket.h>
00030 #include <netinet/in.h>
00031 #include <arpa/inet.h>
00032 #include <unistd.h>
00033 
00034 // std++
00035 #include <iostream>
00036 #include <string>
00037 #include <algorithm>
00038 #include <functional>
00039 #include <list>
00040 
00041 // piave
00042 #include "piave_base.hh"
00043 #include "storybase.hh"
00044 #include "property.hh"
00045 
00046 
00047 // libxml
00048 #include <libxml/xmlmemory.h>
00049 #include <libxml/parser.h>
00050 
00051 
00052 namespace PIAVE {
00053 
00055     class VEMLCmnd;
00056     class KdenLiveServer;
00057 
00058     typedef std::vector< VEMLCmnd* > VEMLCmndList;
00059     typedef std::map< const std::string, VEMLCmnd > VEMLCmndMap;
00060 
00061     typedef std::map< std::string, std::string > VEMLAttrList;
00062 
00063 
00064     typedef PropertyNode * (KdenLiveServer::*VEMLCall)( const VEMLCmnd * );
00065 
00066     class VEMLCmnd : public PropertyNode
00067     {
00068       public:
00069         enum VEMLCmndType { stdQ, dropQ, priority };
00070         VEMLCmnd( const std::string & n = std::string(""), 
00071                   VEMLCall c=0, VEMLCmndType t = stdQ );
00072         VEMLCmnd( const VEMLCmnd & o );
00073         ~VEMLCmnd();
00074 
00075         void copyFromXMLNode( const xmlDocPtr doc, const xmlNodePtr o );
00076 
00077         VEMLCmndType   type()      const { return _type; }
00078         VEMLCall       call()      const { return _call; }
00079 
00080         void setType( VEMLCmndType t ) { _type = t; }
00081         void setCall( VEMLCall c ) { _call = c; }
00082 
00083         static void setAllCmnds( VEMLCmndMap * c ) { _allVEMLCommands = c; }
00084 
00085         bool operator==( const VEMLCmnd & o ) const {
00086             return getName() == o.getName();
00087         }
00088         void operator=( const VEMLCmnd & o );
00089 
00090       private:
00091         VEMLCmndType        _type;
00092         VEMLCall            _call;
00093         static VEMLCmndMap       * _allVEMLCommands;
00094     };
00095 
00096 
00097 }
00098 
00099 #endif

Generated on Tue Oct 14 20:45:37 2003 for piave by doxygen1.2.18