1#############################################################################
2##
3#W workaround_maps.gi 			 polymaking Package		 Marc Roeder
4##
5##
6
7##
8##
9#Y	 Copyright (C) 2006 Marc Roeder
10#Y
11#Y This program is free software; you can redistribute it and/or
12#Y modify it under the terms of the GNU General Public License
13#Y as published by the Free Software Foundation; either version 2
14#Y of the License, or (at your option) any later version.
15#Y
16#Y This program is distributed in the hope that it will be useful,
17#Y but WITHOUT ANY WARRANTY; without even the implied warranty of
18#Y MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19#Y GNU General Public License for more details.
20#Y
21#Y You should have received a copy of the GNU General Public License
22#Y along with this program; if not, write to the Free Software
23#Y Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
24##
25
26###########
27# This is a workaround for the next-generation polymake
28# there we need to call keywords of the form "HASSE_DIAGRAM->FACES"
29# and that does not work as an entry of a record. So we have do do
30# some extra mapping (yes, it is a hack).
31##
32# direction of the mapping: GAP keyword mapped to polymake keyword
33#######
34InstallMethod(MapKeyWordToPolymakeFormat,"for PolymakeObject",[IsString],
35        function(option)
36	if option   = "FACES" then
37	   return     "HASSE_DIAGRAM->FACES";
38	elif option = "DIMS"  then
39	   return     "HASSE_DIAGRAM->DIMS";
40	else
41	   return option;
42	fi;
43end);
44
45##########
46# This is a workaround for the next-generation polymake
47# there we need to call keywords of the form "HASSE_DIAGRAM->FACES"
48# and that does not work as an entry of a record. So we have do do
49# some extra mapping (yes, it is a hack).
50##
51# direction: Polymake output mapped to GAP keywords
52#######
53
54InstallMethod(MapKeyWordFromPolymakeFormat,"for PolymakeObject",[IsString],
55        function(option)
56
57	if option   = "HASSE_DIAGRAM->FACES" then
58	   return     "FACES";
59	elif option = "HASSE_DIAGRAM->DIMS"  then
60	   return     "DIMS";
61	else
62	   return option;
63	fi;
64end);