Class: Bones::Copy

Inherits:
Object
  • Object
show all
Defined in:
lib/bones/copy.rb

Overview

Class copyin/out

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(scop, name, domain, deadline, direction, id) ⇒ Copy

Returns a new instance of Copy.



8
9
10
11
12
13
14
15
# File 'lib/bones/copy.rb', line 8

def initialize(scop,name,domain,deadline,direction,id)
	@scop = scop
	@name = name
	@domain = domain
	@deadline = deadline
	@direction = direction
	@id = id
end

Instance Attribute Details

#deadlineObject

Returns the value of attribute deadline.



6
7
8
# File 'lib/bones/copy.rb', line 6

def deadline
  @deadline
end

#directionObject

Returns the value of attribute direction.



6
7
8
# File 'lib/bones/copy.rb', line 6

def direction
  @direction
end

#domainObject

Returns the value of attribute domain.



6
7
8
# File 'lib/bones/copy.rb', line 6

def domain
  @domain
end

#idObject

Returns the value of attribute id.



6
7
8
# File 'lib/bones/copy.rb', line 6

def id
  @id
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/bones/copy.rb', line 6

def name
  @name
end

#scopObject

Returns the value of attribute scop.



6
7
8
# File 'lib/bones/copy.rb', line 6

def scop
  @scop
end

Instance Method Details

#get_definition(array_definition, type) ⇒ Object



17
18
19
20
# File 'lib/bones/copy.rb', line 17

def get_definition(array_definition,type)
	array_definition = '' if type == 'free' || type == 'alloc'
	'void bones_'+type+'_'+@id+'_'+@name+'('+array_definition+');'
end

#get_function_call(type) ⇒ Object



22
23
24
# File 'lib/bones/copy.rb', line 22

def get_function_call(type)
	'bones_'+type+'_'+@id+'_'+@name+'();'
end