class InstanceKey():

	@staticmethod
	def parse(val):
		tup = val.split('$')
		if len(tup) != 2:
			return None

		return InstanceKey(tup[0], tup[1])

	def __init__(self, class_id : int, inst_id : int):


		self.__class_id = class_id
		self.__inst_id = inst_id

	def get_class_index(self) -> int:
		return self.__class_id

	def get_instance_index(self) -> int:
		return self.__inst_id

	def __str__(self):

		return str(self.get_class_index()) + '$' + str(self.get_instance_index())
	