▁which ▁both ▁use ▁Point , ▁demonstrate ▁how ▁composition ▁works ▁in ▁Pro tocol ▁Buff ers . ▁Poly line ▁has ▁a ▁repeated ▁field , ▁which ▁behav es ▁like ▁a ▁vector . ▁ ▁This ▁schema ▁can ▁subsequently ▁be ▁compiled ▁for ▁use ▁by ▁one ▁or ▁more ▁programming ▁languages . ▁Google ▁provides ▁a ▁compiler ▁called ▁proto c ▁which ▁can ▁produce ▁output ▁for ▁C ++, ▁Java ▁or ▁Python . ▁Other ▁schema ▁comp ilers ▁are ▁available ▁from ▁other ▁sources ▁to ▁create ▁language - dependent ▁output ▁for ▁over ▁ 2 0 ▁other ▁languages . ▁ ▁For ▁example , ▁after ▁a ▁C ++ ▁version ▁of ▁the ▁protocol ▁buffer ▁schema ▁above ▁is ▁produced , ▁a ▁C ++ ▁source ▁code ▁file , ▁poly line . cpp , ▁can ▁use ▁the ▁message ▁objects ▁as ▁follows : ▁// ▁poly line . cpp ▁# include ▁" poly line . pb . h " ▁ ▁// ▁generated ▁by ▁calling ▁" proto c ▁poly line . proto " ▁ ▁Line * ▁create New Line ( const ▁std :: string & ▁name ) ▁{ ▁▁ ▁// ▁create ▁a ▁line ▁from ▁( 1 0 , ▁ 2 0 ) ▁to ▁( 3 0 , ▁ 4 0 ) ▁▁ ▁Line * ▁line ▁= ▁new ▁Line ; ▁▁ ▁line -> mutable _ start ()-> set _ x ( 1 0 ); ▁▁ ▁line -> mutable _ start ()-> set _ y ( 2 0 ); ▁▁ ▁line -> mutable _ end ()-> set _ x ( 3 0 ); ▁▁ ▁line -> mutable _ end ()-> set _ y ( 4 0