-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
146 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
Перем _Поделка; | ||
|
||
Процедура ПриДобавленииОпределенияЖелудя(Знач ОпределениеЖелудя) Экспорт | ||
|
||
ЭтоПриемка = ОпределениеЖелудя.Прозвища().Найти("Приемка") <> Неопределено; | ||
Если НЕ ЭтоПриемка Тогда | ||
Возврат; | ||
КонецЕсли; | ||
|
||
ИнтерфейсПриемка = Новый ИнтерфейсОбъекта() | ||
.ПроцедураИнтерфейса("ПриДобавленииОпределенияЖелудя", 1); | ||
|
||
Если НЕ ИнтерфейсПриемка.Реализован(ОпределениеЖелудя.Методы()) Тогда | ||
ТекстСообщения = СтрШаблон( | ||
"Определение желудя %1 не реализует методы интерфейса &Приемка", | ||
ОпределениеЖелудя.Имя() | ||
); | ||
ВызватьИсключение ТекстСообщения; | ||
КонецЕсли; | ||
|
||
Приемка = _Поделка.НайтиЖелудь(ОпределениеЖелудя.Имя()); | ||
|
||
ВсеОпределенияЖелудей = _Поделка.ПолучитьОпределенияЖелудей(); | ||
Для Каждого КлючИЗначение Из ВсеОпределенияЖелудей Цикл | ||
|
||
ИмяЖелудя = КлючИЗначение.Ключ; | ||
|
||
Если ИмяЖелудя = ОпределениеЖелудя.Имя() Тогда | ||
Продолжить; | ||
КонецЕсли; | ||
|
||
Приемка.ПриДобавленииОпределенияЖелудя(ОпределениеЖелудя); | ||
|
||
КонецЦикла; | ||
|
||
КонецПроцедуры | ||
|
||
&Приемка("ПриемкаПриемка") | ||
&Порядок(0) | ||
Процедура ПриСозданииОбъекта(&Пластилин Поделка) | ||
_Поделка = Поделка; | ||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
&Аннотация("Приемка") | ||
&Спецификация("Инициализация") | ||
Процедура ПриСозданииОбъекта(Значение = "") | ||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#Использовать reflector | ||
|
||
Процедура ПриДобавленииОпределенияЖелудя(Знач ОпределениеЖелудя) Экспорт | ||
|
||
ЭтоЗаготовка = ОпределениеЖелудя.Прозвища().Найти("Заготовка") <> Неопределено; | ||
Если НЕ ЭтоЗаготовка Тогда | ||
Возврат; | ||
КонецЕсли; | ||
|
||
РефлекторОбъекта = Новый РефлекторОбъекта(ОпределениеЖелудя.ТипЖелудя()); | ||
|
||
Ожидаем | ||
.Что( | ||
РефлекторОбъекта.ЕстьПроцедура("ПриИнициализацииПоделки", 1), | ||
"Заготовка должна иметь процедуру ПриИнициализацииПоделки(Поделка)" | ||
) | ||
.ЭтоИстина(); | ||
|
||
КонецПроцедуры | ||
|
||
&Приемка | ||
Процедура ПриСозданииОбъекта() | ||
|
||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#Использовать reflector | ||
|
||
Процедура ПриДобавленииОпределенияЖелудя(Знач ОпределениеЖелудя) Экспорт | ||
|
||
ЭтоРогатка = ОпределениеЖелудя.Прозвища().Найти("Рогатка") <> Неопределено; | ||
Если НЕ ЭтоРогатка Тогда | ||
Возврат; | ||
КонецЕсли; | ||
|
||
РефлекторОбъекта = Новый РефлекторОбъекта(ОпределениеЖелудя.ТипЖелудя()); | ||
|
||
Ожидаем | ||
.Что( | ||
РефлекторОбъекта.ЕстьПроцедура("ПриЗапускеПриложения", 0), | ||
"Рогатка должна иметь процедуру ПриЗапускеПриложения()" | ||
) | ||
.ЭтоИстина(); | ||
|
||
КонецПроцедуры | ||
|
||
&Приемка | ||
Процедура ПриСозданииОбъекта() | ||
|
||
КонецПроцедуры |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
#Использовать "../internal" | ||
|
||
Перем _ПрилепляторЧастиц; | ||
Перем _БазоваяПрилепляемаяЧастица; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters