# Tex Custom Arrow with oplus symbol

I'd like to create the kind of arrow that shows inner classes in UML, that is, an arrow that starts with an \oplus symbol as it can be seen here: http://myumlnotes.blogspot.com.es/2007/01/inner-class.html with Tikz.

Anyone could help me define that arrow? Something like \pgfarrowsdeclare{OPLUS arrow}{OPLUS arrow} could be perfect

You can use the definition of the o arrows and add the plus with:

  \pgfpathmoveto{\pgfqpoint{0bp}{0bp}}%
\pgfpathlineto{\pgfqpoint{9\pgfutil@tempdima}{0bp}}%
\pgfpathmoveto{\pgfqpoint{4.5\pgfutil@tempdima}{4.5\pgfutil@tempdima}}%
\pgfpathlineto{\pgfqpoint{4.5\pgfutil@tempdima}{-4.5\pgfutil@tempdima}}%


The backgrounds library and its gridded option is only used to show where TikZ places the arrows.

## Code

\documentclass[tikz,convert=false]{standalone}
\usetikzlibrary{backgrounds}
\makeatletter
\pgfarrowsdeclare{oplus}{oplus}{%
\pgfarrowsleftextend{+-.5\pgflinewidth}
\pgfutil@tempdima=0.4pt%
\pgfarrowsrightextend{+\pgfutil@tempdimb}%
}{%
\pgfutil@tempdima=0.4pt%
\pgfsetdash{}{+0pt}%
\pgfpathcircle{\pgfqpoint{4.5\pgfutil@tempdima}{0bp}}{4.5\pgfutil@tempdima}%
\pgfpathmoveto{\pgfqpoint{0bp}{0bp}}%
\pgfpathlineto{\pgfqpoint{9\pgfutil@tempdima}{0bp}}%
\pgfpathmoveto{\pgfqpoint{4.5\pgfutil@tempdima}{4.5\pgfutil@tempdima}}%
\pgfpathlineto{\pgfqpoint{4.5\pgfutil@tempdima}{-4.5\pgfutil@tempdima}}%
\pgfusepathqstroke
}
\makeatother
\begin{document}
\tikz[gridded]\draw[oplus-oplus] (0,0) -- +(right:1) -- +(up:1);
\end{document}


## Output

• Thank you so much, that what's exactly what I was looking for :) If I had to do any remark would be to put the \pgfutil@tempdima=0.4pt% to 0.8pt so that in an UML diagram is well seen the oplus, but all in all, thank you Jul 31 '13 at 10:19