| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head> |
| <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> |
| <title>Skia: /Volumes/disk/skia/trunk/include/svg/SkSVGAttribute.h Source File</title> |
| <link href="tabs.css" rel="stylesheet" type="text/css"/> |
| <link href="doxygen.css" rel="stylesheet" type="text/css"/> |
| </head> |
| <body> |
| <!-- Generated by Doxygen 1.6.1 --> |
| <div class="navigation" id="top"> |
| <div class="tabs"> |
| <ul> |
| <li><a href="main.html"><span>Main Page</span></a></li> |
| <li><a href="namespaces.html"><span>Namespaces</span></a></li> |
| <li><a href="annotated.html"><span>Classes</span></a></li> |
| <li class="current"><a href="files.html"><span>Files</span></a></li> |
| </ul> |
| </div> |
| <div class="tabs"> |
| <ul> |
| <li><a href="files.html"><span>File List</span></a></li> |
| <li><a href="globals.html"><span>File Members</span></a></li> |
| </ul> |
| </div> |
| <h1>/Volumes/disk/skia/trunk/include/svg/SkSVGAttribute.h</h1><a href="_sk_s_v_g_attribute_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> |
| <a name="l00002"></a>00002 <span class="comment"> * Copyright (C) 2006 The Android Open Source Project</span> |
| <a name="l00003"></a>00003 <span class="comment"> *</span> |
| <a name="l00004"></a>00004 <span class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</span> |
| <a name="l00005"></a>00005 <span class="comment"> * you may not use this file except in compliance with the License.</span> |
| <a name="l00006"></a>00006 <span class="comment"> * You may obtain a copy of the License at</span> |
| <a name="l00007"></a>00007 <span class="comment"> *</span> |
| <a name="l00008"></a>00008 <span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span> |
| <a name="l00009"></a>00009 <span class="comment"> *</span> |
| <a name="l00010"></a>00010 <span class="comment"> * Unless required by applicable law or agreed to in writing, software</span> |
| <a name="l00011"></a>00011 <span class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</span> |
| <a name="l00012"></a>00012 <span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span> |
| <a name="l00013"></a>00013 <span class="comment"> * See the License for the specific language governing permissions and</span> |
| <a name="l00014"></a>00014 <span class="comment"> * limitations under the License.</span> |
| <a name="l00015"></a>00015 <span class="comment"> */</span> |
| <a name="l00016"></a>00016 |
| <a name="l00017"></a>00017 <span class="preprocessor">#ifndef SkSVGAttribute_DEFINED</span> |
| <a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define SkSVGAttribute_DEFINED</span> |
| <a name="l00019"></a>00019 <span class="preprocessor"></span> |
| <a name="l00020"></a>00020 <span class="preprocessor">#include "<a class="code" href="_sk_types_8h.html">SkTypes.h</a>"</span> |
| <a name="l00021"></a>00021 |
| <a name="l00022"></a><a class="code" href="struct_sk_s_v_g_attribute.html">00022</a> <span class="keyword">struct </span><a class="code" href="struct_sk_s_v_g_attribute.html">SkSVGAttribute</a> { |
| <a name="l00023"></a><a class="code" href="struct_sk_s_v_g_attribute.html#a43013e5b7319434995b61cbd630b1187">00023</a> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="struct_sk_s_v_g_attribute.html#a43013e5b7319434995b61cbd630b1187">fName</a>; |
| <a name="l00024"></a>00024 <span class="preprocessor">#ifdef SK_DEBUG</span> |
| <a name="l00025"></a><a class="code" href="struct_sk_s_v_g_attribute.html#a6eb385ab5ee8febfb9685012f146b190">00025</a> <span class="preprocessor"></span> <span class="keywordtype">size_t</span> <a class="code" href="struct_sk_s_v_g_attribute.html#a6eb385ab5ee8febfb9685012f146b190">fOffset</a>; |
| <a name="l00026"></a>00026 <span class="preprocessor">#endif</span> |
| <a name="l00027"></a>00027 <span class="preprocessor"></span>}; |
| <a name="l00028"></a>00028 |
| <a name="l00029"></a>00029 <span class="preprocessor">#ifndef SK_OFFSETOF</span> |
| <a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#define SK_OFFSETOF(a, b) (((size_t) (&(((a*) 1)->b)))-1)</span> |
| <a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| <a name="l00032"></a>00032 <span class="preprocessor"></span> |
| <a name="l00033"></a>00033 <span class="preprocessor">#ifdef SK_DEBUG</span> |
| <a name="l00034"></a><a class="code" href="_sk_s_v_g_attribute_8h.html#adb5ffbb6056e0abb9d6c4f32329f1f79">00034</a> <span class="preprocessor"></span><span class="preprocessor">#define SVG_ATTRIBUTE(attr) { #attr, SK_OFFSETOF(BASE_CLASS, f_##attr) }</span> |
| <a name="l00035"></a><a class="code" href="_sk_s_v_g_attribute_8h.html#a3e4229f9d94143e6bcdd63c6a8fbbc41">00035</a> <span class="preprocessor"></span><span class="preprocessor">#define SVG_LITERAL_ATTRIBUTE(svgAttr, cAttr) { #svgAttr, SK_OFFSETOF(BASE_CLASS, cAttr) }</span> |
| <a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#else</span> |
| <a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define SVG_ATTRIBUTE(attr) { #attr }</span> |
| <a name="l00038"></a>00038 <span class="preprocessor"></span><span class="preprocessor">#define SVG_LITERAL_ATTRIBUTE(svgAttr, cAttr) { #svgAttr }</span> |
| <a name="l00039"></a>00039 <span class="preprocessor"></span><span class="preprocessor">#endif</span> |
| <a name="l00040"></a>00040 <span class="preprocessor"></span> |
| <a name="l00041"></a><a class="code" href="_sk_s_v_g_attribute_8h.html#a45bf9fb2eac235105dcf2dcfb3a8b4b4">00041</a> <span class="preprocessor">#define SVG_ADD_ATTRIBUTE(attr) \</span> |
| <a name="l00042"></a>00042 <span class="preprocessor"> if (f_##attr.size() > 0) \</span> |
| <a name="l00043"></a>00043 <span class="preprocessor"> parser._addAttributeLen(#attr, f_##attr.c_str(), f_##attr.size())</span> |
| <a name="l00044"></a>00044 <span class="preprocessor"></span> |
| <a name="l00045"></a><a class="code" href="_sk_s_v_g_attribute_8h.html#a0a3e5e866b4637a7855736a55b8825b8">00045</a> <span class="preprocessor">#define SVG_ADD_ATTRIBUTE_ALIAS(attr, alias) \</span> |
| <a name="l00046"></a>00046 <span class="preprocessor"> if (f_##alias.size() > 0) \</span> |
| <a name="l00047"></a>00047 <span class="preprocessor"> parser._addAttributeLen(#attr, f_##alias.c_str(), f_##alias.size())</span> |
| <a name="l00048"></a>00048 <span class="preprocessor"></span> |
| <a name="l00049"></a>00049 <span class="preprocessor">#endif // SkSVGAttribute_DEFINED</span> |
| </pre></div></div> |
| <hr size="1"/><address style="text-align: right;"><small>Generated on Tue Oct 20 10:33:00 2009 for Skia by |
| <a href="http://www.doxygen.org/index.html"> |
| <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
| </body> |
| </html> |