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(name, domain, deadline, direction, id) ⇒ Copy

Returns a new instance of Copy.



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

def initialize(name,domain,deadline,direction,id)
  @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

Instance Method Details

#get_definition(array_definition, type) ⇒ Object



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

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



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

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