Advertisement
spacechase0

Get/Set Abbr.

Jun 25th, 2012
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. [[local str = "$(var)";local result = str.slice( 0, 1 ).toupper() + str.slice( 1, str.len() );print( "$(type) $(class)::get" + result + "() const" );]]
  2. {
  3. return $(var);
  4. }
  5.  
  6. [[local str = "$(var)";local result = str.slice( 0, 1 ).toupper() + str.slice( 1, str.len() );print( "void $(class)::set" + result + "( $(type) the" + result + " ) const" );]]
  7. {
  8. [[local str = "$(var)";local result = str.slice( 0, 1 ).toupper() + str.slice( 1, str.len() );print( "\t$(var) = the" + result + ";" );]]
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement