CN106843992A - Data managing method and device - Google Patents

Data managing method and device Download PDF

Info

Publication number
CN106843992A
CN106843992A CN201611199260.1A CN201611199260A CN106843992A CN 106843992 A CN106843992 A CN 106843992A CN 201611199260 A CN201611199260 A CN 201611199260A CN 106843992 A CN106843992 A CN 106843992A
Authority
CN
China
Prior art keywords
project
file
data
header file
purpose project
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201611199260.1A
Other languages
Chinese (zh)
Inventor
汪刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201611199260.1A priority Critical patent/CN106843992A/en
Publication of CN106843992A publication Critical patent/CN106843992A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4434Reducing the memory space required by the program code
    • G06F8/4435Detection or removal of dead or redundant code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/44Encoding
    • G06F8/443Optimisation
    • G06F8/4441Reducing the execution time required by the program code
    • G06F8/4442Reducing the number of cache misses; Data prefetching

Abstract

The present invention provides a kind of data managing method and device, belongs to field of computer technology.The method includes:Based on the type of data under purpose project project, corresponding header file is generated;When the call instruction of any data is detected, the corresponding header file of any data is imported in purpose project project.The present invention generates corresponding header file by the type based on data under purpose project project.When the call instruction of any data is detected, the corresponding header file of any data is imported in purpose project project.Due to the different types of data of prescription controller can be imported into corresponding header file, so as to avoid data in prescription controller, the security of data is improve.Secondly as the publicly-owned data for being frequently necessary to call have put into PCH, so as to subsequently PCH only need to be quoted without repeating to import these publicly-owned data, so as to improve speed during follow-up code compilation, code redundancy is reduced.

Description

Data managing method and device
Technical field
The present invention relates to field of computer technology, more particularly, to a kind of data managing method and device.
Background technology
With the deep development of internet, the user of watching video live broadcast is more and more.Wherein, live page is one straight The most complicated and most crucial pages of app are broadcast, this page includes many functions, such as barrage, chat, transmission present, reception gift Thing, the rotation supplementing with money, shield user, report user, watching live, setting player brightness, regulation player sound and screen Direction etc. function different more than 30 kinds.So Multifunctional writing is in UIViewController (interfacial level controller, apple The Primary containers of code are deposited in development language) the inside, as version ground iteration and future carry out function expansion to live page, The code of this receptacle can rows up to ten thousand even tens of thousands of rows.The controller of one line code up to ten thousand be not easy to developer after Continuous Maintenance Development, also it is unfavorable for continuing extended function on this version.
Wherein, include in a UIViewController for line codes up to ten thousand substantial amounts of macrodefinition, constant, piece Act, header file, classification header file and attribute etc..If these data are all placed on controller the inside, can be made in certain degree Into the code redundancy of controller.In addition, when other pages need to call these data, also can be very inconvenient.Therefore, in work It is badly in need of a kind of data managing method on journey item perspective.
The content of the invention
The present invention provide it is a kind of overcome above mentioned problem or the data managing method that solves the above problems at least in part and Device.
According to an aspect of the present invention, there is provided a kind of data managing method, the method includes:
Based on the type of data under purpose project project, corresponding header file is generated, purpose project project is application and development Engineering project;
When the call instruction of any data is detected, the corresponding head text of any data is imported in purpose project project Part.
According to another aspect of the present invention, there is provided a kind of data administrator, the device includes:
First generation module, for the type based on data under purpose project project, generates corresponding header file, target work Journey project is application and development engineering project;
Import modul, for when the call instruction of any data is detected, any number being imported in purpose project project According to corresponding header file.
The beneficial effect brought of technical scheme that the application is proposed is:
By the type based on data under purpose project project, corresponding header file is generated.When detecting any data During call instruction, the corresponding header file of any data is imported in purpose project project.Due to can be different in prescription controller The data of type are imported into corresponding header file, so as to avoid data in prescription controller, improve data Security.
Secondly as being frequently necessary to the publicly-owned data such as the publicly-owned header file that calls puts into corresponding PCH, So as to subsequently without repeating to import these publicly-owned data, PCH only need to be quoted, so as to improve follow-up code Speed during compiling, reduces code redundancy.
Brief description of the drawings
Fig. 1 is a kind of schematic flow sheet of data managing method of the embodiment of the present invention;
Fig. 2 is a kind of schematic flow sheet of data managing method of the embodiment of the present invention;
Fig. 3 is a kind of structural representation of data administrator of the embodiment of the present invention.
Specific embodiment
With reference to the accompanying drawings and examples, specific embodiment of the invention is described in further detail.Hereinafter implement Example is not limited to the scope of the present invention for illustrating the present invention.
As the function that five application page is included is more and more, if so Multifunctional writing is in a UIViewController (interfacial level controller deposits the Primary containers of code in apple development language) the inside, as version ground iteration and future are to application The page carries out function expansion, and the code of this receptacle can rows up to ten thousand even tens of thousands of rows.One controller of line codes up to ten thousand It is not easy to developer and continues Maintenance Development, is also unfavorable for continuing extended function on this version.This can cause control Device code redundancy processed, and when other pages need to call these data, also can be very inconvenient.
Further, since with the iterative development of engineering project version, the resource under engineering catalogue is also constantly replaced, so that If causing to delete in time the left discarded record of each version institute, the discarded record resource under engineering catalogue can it is more long-pending more It is many.Wherein, engineering project is application and development engineering project.For example, iOS projects need to rely on substantial amounts of resource picture, project Exploitation and iteration have a large amount of picture resources to be needed to delete, and 2000 pictures are even more than in mega project.If these pictures Can not delete in time, having accumulated long can cause subsequent project to develop usable memory space inadequate.Accordingly, it would be desirable to useless number According to being deleted.
For the problems of the prior art, a kind of data managing method is the embodiment of the invention provides.Based on the above, Referring to Fig. 1, the method flow that the present embodiment is provided includes:101st, the type based on data under purpose project project, generation is corresponding Header file;102nd, when the call instruction of any data is detected, any data is imported in purpose project project corresponding Header file.
Wherein, purpose project project is application and development engineering project.Because the usual quantity of application and development engineering project is more, So as to one of them can be needed to carry out the application and development engineering project of data management as intended application Development Engineering project.
Method provided in an embodiment of the present invention, by the type based on data under purpose project project, generates corresponding head File.When the call instruction of any data is detected, the corresponding header file of any data is imported in purpose project project.By In different types of data in prescription controller can be imported into corresponding header file, so as to avoid data exposed to default In controller, the security of data is improve.
Secondly as being frequently necessary to the publicly-owned data such as the publicly-owned header file that calls puts into corresponding PCH, So as to subsequently without repeating to import these publicly-owned data, PCH only need to be quoted, so as to improve follow-up code Speed during compiling, reduces code redundancy.
Used as a kind of alternative embodiment, data include the proprietary macrodefinition of prescription controller, constant or enumerated variable, are based on The type of data under purpose project project, before generating corresponding header file, including:
Based on the first instruction for creating header file, the first header file is created;
Based on the type of data under purpose project project, corresponding header file is generated, including:
The proprietary macrodefinition of prescription controller, constant or enumerated variable are imported into the first header file.
Used as a kind of alternative embodiment, data are the classification header file or non-categorical header file that prescription controller is relied on, base In the type of data under purpose project project, before generating corresponding header file, including:
Based on the second instruction for creating header file, the second header file is created;
Based on the 3rd instruction for creating header file, the 3rd header file is created;
Based on the type of data under purpose project project, corresponding header file is generated, including:
Content in the classification header file that prescription controller is relied on, imported into the second header file;
Content in the non-categorical header file that prescription controller is relied on, imported into the 3rd header file.
Used as a kind of alternative embodiment, data are property value, and based on the type of data under purpose project project, generation is corresponding Header file, including:
Determine the corresponding class of property value;
Property value is imported into the corresponding header file of class.
Used as a kind of alternative embodiment, data are publicly-owned macrodefinition, publicly-owned constant, publicly-owned enumerated variable or publicly-owned head text Part, based on the type of data under purpose project project, generates corresponding header file, including:
According to the title of purpose project project, PCH is created;
Content in publicly-owned macrodefinition, publicly-owned constant, publicly-owned enumerated variable or publicly-owned header file is imported into precompiled header In file.
Used as a kind of alternative embodiment, the method also includes:
The corresponding file destination of specified file suffix name under purpose project catalogue is searched, purpose project catalogue is purpose project The corresponding engineering catalogue of project;
Determine the unreferenced file destination of purpose project item code in lookup result;
Delete unreferenced file destination.
As a kind of alternative embodiment, search under purpose project catalogue the corresponding file destination of specified file suffix name it Before, including:
Order line command based on user input, navigates to current operation catalogue, and will operate catalogue as target work Journey catalogue.
As a kind of alternative embodiment, the corresponding file destination of specified file suffix name under purpose project catalogue, bag are searched Include:
Based on default regular expression, the fileinfo of file under purpose project catalogue and specified file suffix name are carried out Matching, using the file that the match is successful as file destination;
According to the corresponding fileinfo generation fileinfo list of file destination, and as lookup result.
As a kind of alternative embodiment, the unreferenced file destination of purpose project item code, bag in lookup result are determined Include:
For the corresponding either objective file of any fileinfo in fileinfo list, purpose project item code is searched In whether include any fileinfo;
When comprising any fileinfo, determine that purpose project item code quotes either objective file;
When not comprising any fileinfo, the unreferenced either objective file of purpose project item code is determined.
Above-mentioned all optional technical schemes, can form alternative embodiment of the invention, herein no longer using any combination Repeat one by one.
Because many functions can be all write in prescription controller under engineering project, as many function codes under live all can Write in UIViewController this interfacial level controller, this can cause mass data to be all placed in this prescription controller, And cause code redundancy, so as to need that the data under engineering project are managed.In addition, generally there is many under engineering project The discarded record do not quoted by engineering project code, so as to need to delete these files.
Based on the content in the above and Fig. 1 correspondence embodiments, a kind of data management side is the embodiment of the invention provides Method.Referring to Fig. 2, the method includes:201st, the type based on data under purpose project project, generates corresponding header file;202、 When the call instruction of any data is detected, the corresponding header file of any data is imported in purpose project project;203rd, base In the order line command of user input, current operation catalogue is navigated to, and catalogue will be operated as purpose project catalogue;204、 Search the corresponding file destination of specified file suffix name under purpose project catalogue;205th, purpose project project in lookup result is determined The unreferenced file destination of code;206th, unreferenced file destination is deleted.
Wherein, 201, the type based on data under purpose project project, generates corresponding header file.
In this step, purpose project project is application and development engineering project.Due to the data class under purpose project project Type is a lot, and now for the data of each type, the process to generating corresponding header file in this step is illustrated.
(1) data include the proprietary macrodefinition of prescription controller, constant or enumerated variable.
Wherein, prescription controller can be interfacial level controller UIViewController, and the present embodiment is not made specifically to this Limit.Data can be one or more of above-mentioned three kinds of data, and the present embodiment is also not especially limited to this.
Before this step is performed, can be based on creating the first instruction of header file, create the first header file.Specifically, with Prescription controller is for as a example by DYNewPlayer controllers.
In apple developing instrument xcode, click upper left corner menu " File "->“New File”->“Header File ", clicks in the interface for occurring " Next ", import file name " DYNewPlayerConstant.h " can just be created that One header file, i.e. the first header file.
Correspondingly, the proprietary macrodefinition of DYNewPlayer controllers, constant or enumerated variable can be imported into In " DYNewPlayerConstant.h " this header file.
(2) data are the classification header file or non-categorical header file that prescription controller is relied on.
Before this step is performed, can be based on creating the second instruction of header file, create the second header file;Based on establishment head 3rd instruction of file, creates the 3rd header file.
Specifically, equally two header files can be respectively created according to the process of above-mentioned establishment header file.Create This header file of DYNewPlayerCategor.h as the second header file, create DYNewPlayerBaseHeader.h this Header file is used as the 3rd header file.
Wherein, the content in the classification header file that can be relied on prescription controller DYNewPlayer, imported into In DYNewPlayerCategor.h.Content in the non-categorical header file that prescription controller DYNewPlayer is relied on, leads Enter in DYNewPlayerBaseHeader.h.
(3) data are property value.
Generally, property value is in the .m files of prescription controller.In the present embodiment, based on classification access , can be put into property value in the .h files of class by principle, and these property values are called in order to subsequent classification.
Correspondingly, can first determine the corresponding class of property value, then property value is imported into the corresponding header file of class.
(4) data are publicly-owned macrodefinition, publicly-owned constant, publicly-owned enumerated variable or publicly-owned header file.
Wherein, data can be one or more of above-mentioned four kinds of data, and the present embodiment is not especially limited to this.
The publicly-owned usual quantity of header file is more, and many controllers are required for calling publicly-owned header file in usual engineering project. For example, for publicly-owned header file UserDefaults.h, more than 50% controller needs to import this header file.If each Controller all import the publicly-owned header file for calling in need, this can cause great code redundancy.In this case, can root According to the title of purpose project project, PCH, i.e. pch files are created.Publicly-owned header file is put into the pch texts of establishment In part.
Specifically, the xcode project files of engineering project can be opened.The Supporting of projects is found in click Files catalogues, create pch files under this catalogue.Selection " File "->New->File->iOS->Other, then clicks on Next step.
A title can be input into after click next step, if the title of engineering project is DYLive, then pch files Title can be DYLive-Prefix.pch.After determining the title of pch files, establishment button can be clicked on and create pch files.
The engineering Project in xcode is clicked on, Build Settings are selected, then the search interface in xcode is searched for Prefix Header。
Apple LLVM 6.0 are found inside xcode, is found after this column it can be seen that the key of Prefix Header Word, clicks on input $ (SRCROOT)/YourProject-Prefix.pch herein.
Click on after the completion of input, YES can be selected on the corresponding options of Precompile Prefix Header.By upper After stating treatment, the PCH files after precompile can be buffered, such that it is able to greatly improve compilation speed.
After pch document creations and configuration are completed, can the whole xcode engineering projects of Clean, it is also possible to by shortcut Caps+command+k carrys out the whole project files of build.By said process, the establishment and configuration of pch files can be completed.
After PCH pch is created and configuration is finished, can be by publicly-owned macrodefinition, publicly-owned constant, publicly-owned enumerated variable Or the content in publicly-owned header file is imported into PCH.Because the content of publicly-owned header file has had been imported into pch In file, so that the publicly-owned header file being had been introduced into can deleting engineering project, the present embodiment is not especially limited to this.
Different types of data are mainly carried out Classification Management by above-mentioned steps 201 to step 202, will be different types of Data are imported into corresponding header file.Because as engineering project is in the propulsion of development process, the version of engineering project also exists Constantly iteration.Correspondingly, the file resource in engineering project is also constantly replaced.Because engineering project version updating is usual Comparatively fast, the left discarded record resource of version can be cumulative before, so as to produce memory space inadequate in order to avoid follow-up Problem, it is necessary to delete discarded record.
Based on the above, data delete angle during the subsequent step of the present embodiment is based on data management, it is proposed that a kind of Data-erasure method, refers to the content in subsequent step.
Wherein, 203, the order line command based on user input, navigates to current operation catalogue, and operation catalogue is made It is purpose project catalogue.
In this step, purpose project catalogue is the corresponding engineering catalogue of purpose project project.This step and subsequent step Practice processes be by perform script file to delete hash, this step and subsequent step are based primarily upon pin The process that presents is deleted hash is illustrated.Wherein, script file can be the shell pin of .sh suffix names This, the present embodiment does not make specific restriction to the type of script file.Wherein, purpose project catalogue is the mesh that script file is performed Record.
As shown in the above, because script file needs to be performed under assigned catalogue, to delete the nothing under assigned catalogue With file, so as to be subjected to the order line command of user input in this step, the catalogue needed for navigating to user is that is, current Operation catalogue.For example, user can constantly exit every first class catalogue by being input into cd orders, until the root of engineering project.This When, the root of engineering project is purpose project catalogue.
Wherein, 204 the corresponding file destination of specified file suffix name under purpose project catalogue, is searched.
Because the discarded record for needing to delete generally has certain general character, version is left down before such as discarded record is usually Image file so that discarded record is usually the file with picture format suffix name.Before this step is performed, can be in pin File suffixes name, such as png, jpg or bmp are specified in presents.Certainly, file suffixes name except image file it is corresponding after Sew outside name, can also be the xib file suffixes name in xcode, the present embodiment does not make specific limit to the type of file suffixes name It is fixed.
Mode of the present embodiment not to searching the corresponding file destination of specified file suffix name under purpose project catalogue is made to have Body is limited, including but not limited to:Based on default regular expression, by the fileinfo of file under purpose project catalogue and specified text Part suffix name is matched, using the file that the match is successful as file destination;According to the corresponding fileinfo generation of file destination Fileinfo list, and as lookup result.Wherein, fileinfo at least includes filename and file suffixes name, the present embodiment This is not especially limited.
In above-mentioned search procedure, and the conventional string matching mode of prior art is provided without, but by canonical table Up to formula, fileinfo is matched with file suffixes name.Due to when being matched by regular expression, compared to character String matching, the compiling efficiency of bottom compiler is higher, so as to improve efficiency when file is deleted.
Wherein, 205 the unreferenced file destination of purpose project item code in lookup result, is determined.
In above-mentioned steps 204, mainly find out and specify in engineering project the corresponding All Files of file suffixes name.These In the purpose project item code of current version, what is had may be cited file, and some possibility are not cited.Wherein, The file not being cited is and needs deleted file.In this step, it is necessary in confirming purpose project item code which A little files need to be deleted.
Based on the content in above-mentioned steps 204, the present embodiment not pair do not determine lookup result in purpose project item code not The mode of the file destination of reference makees specific restriction, including but not limited to:For any fileinfo pair in fileinfo list Whether the either objective file answered, any fileinfo is included in lookup purpose project item code;When comprising any file letter During breath, determine that purpose project item code quotes either objective file;When not comprising any fileinfo, purpose project is determined The unreferenced either objective file of item code.
For example, by taking the entitled png of file suffixes as an example.Would generally be quoted as follows in purpose project item code A certain image file, such as " a.png ".When refer to a certain image file, would generally be included in purpose project item code should Filename and the file suffixes name of image file, i.e. fileinfo.Correspondingly, when in purpose project item code include a certain text During part information, then to can determine that and refer to the corresponding file of this document information in purpose project item code.Conversely, not drawing then With.
By this step, can confirm in the All Files under purpose project catalogue, there is which file destination engineering project Code is being quoted, and which file destination engineering project code is not being quoted, so as to all file correspondences that are not cited can be obtained Fileinfo, in order to subsequently be deleted.In this step, the specific mesh where fileinfo can also include file Record.
Wherein, 206 unreferenced file destination, is deleted.
It is contemplated that user may need to have checked which file is not cited, or it should be understood that probably how many is literary Part is not cited, so as to before this step is performed, generate text according to the corresponding fileinfo of unreferenced file destination Presents, the content in display text, the present embodiment is not especially limited to this.By the process, user can be easy to Solution has which file is not cited.Above-mentioned steps and this step are the specific implementation procedure of script file, when script file is held When row is finished, all discarded records that engineering project code is not quoted can all be deleted.
Above-mentioned steps 203 to step 206 is mainly the process that data are deleted, and the process that data are deleted falls within data management In a ring.But it should be recognized that above-mentioned steps 203 to the content in step 206 can be prior to above-mentioned steps 201 and step 202 perform.It is of course also possible to according to the describing mode of the present embodiment, after above-mentioned steps 201 and step 202 are finished, then Step 203 is performed to step 206, the present embodiment is not especially limited to this.
Method provided in an embodiment of the present invention, by the type based on data under purpose project project, generates corresponding head File.When the call instruction of any data is detected, the corresponding header file of any data is imported in purpose project project.By In different types of data in prescription controller can be imported into corresponding header file, so as to avoid data exposed to default In controller, the security of data is improve.
Secondly as being frequently necessary to the publicly-owned data such as the publicly-owned header file that calls puts into corresponding PCH, So as to subsequently without repeating to import these publicly-owned data, PCH only need to be quoted, so as to improve follow-up code Speed during compiling, reduces code redundancy.
From secondary, by the order line command based on user input, current operation catalogue is navigated to, and operation catalogue is made It is purpose project catalogue.Search the corresponding file destination of specified file suffix name under purpose project catalogue.In determining lookup result The unreferenced file destination of purpose project item code, deletes unreferenced file destination.Due to file suffixes can be directly based upon Name, determines which discarded record is not cited and needs to be deleted.Therefore, file delete when accuracy rate it is higher, effect compared with It is good.
Further, since can be unified to delete all of discarded record by way of perform script file, so as to improve text Efficiency when part is deleted.
Finally, due to when the file of specified file suffix name is searched, matched by regular expression, compared to String matching, the compiling efficiency of bottom compiler is higher, so as to further increasing efficiency when file is deleted.
A kind of data administrator is the embodiment of the invention provides, the device is used to perform above-mentioned Fig. 1 or Fig. 2 correspondence implementations The data managing method that example is provided.Referring to Fig. 3, the device includes:
First generation module 301, for the type based on data under purpose project project, generates corresponding header file, mesh Mark engineering project is application and development engineering project;
Import modul 302, for when the call instruction of any data is detected, being imported in purpose project project any The corresponding header file of data.
Used as a kind of alternative embodiment, data include the proprietary macrodefinition of prescription controller, constant or enumerated variable, the dress Putting also includes:
First creation module, for based on the first instruction for creating header file, creating the first header file;
First generation module 301, for by the proprietary macrodefinition of prescription controller, constant or enumerated variable, importeding into In first header file.
Used as a kind of alternative embodiment, data are the classification header file or non-categorical header file that prescription controller is relied on, should Device also includes:
Second creation module, for based on the second instruction for creating header file, creating the second header file;It is literary based on head is created 3rd instruction of part, creates the 3rd header file;
First generation module 301, for prescription controller is relied on classification header file in content, imported into second In header file;Content in the non-categorical header file that prescription controller is relied on, imported into the 3rd header file.
Used as a kind of alternative embodiment, data are property value, the first generation module 301, for determining that property value is corresponding Class;Property value is imported into the corresponding header file of class.
Used as a kind of alternative embodiment, data are publicly-owned macrodefinition, publicly-owned constant, publicly-owned enumerated variable or publicly-owned head text Part, the first generation module 301, for the title according to purpose project project, creates PCH;By publicly-owned macrodefinition, Content in publicly-owned constant, publicly-owned enumerated variable or publicly-owned header file is imported into PCH.
Used as a kind of alternative embodiment, the device also includes:
Searching modul, for searching the corresponding file destination of specified file suffix name, purpose project under purpose project catalogue Catalogue is the corresponding engineering catalogue of purpose project project;
Determining module, for determining the unreferenced file destination of purpose project item code in lookup result;
Removing module, for deleting unreferenced file destination.
Used as a kind of alternative embodiment, the device also includes:
Locating module, for the order line command based on user input, navigates to current operation catalogue, and will operate mesh Record is used as purpose project catalogue.
As a kind of alternative embodiment, searching modul, for based on default regular expression, by purpose project catalogue hereafter The fileinfo of part is matched with specified file suffix name, using the file that the match is successful as file destination;According to target text The corresponding fileinfo generation fileinfo list of part, and as lookup result.
As a kind of alternative embodiment, determining module, for corresponding for any fileinfo in fileinfo list Whether either objective file, any fileinfo is included in lookup purpose project item code;When comprising any fileinfo, Determine that purpose project item code quotes either objective file;When not comprising any fileinfo, purpose project project is determined The unreferenced either objective file of code.
Used as a kind of alternative embodiment, the device also includes:
Second generation module, for according to the corresponding fileinfo of unreferenced file destination, generating text;
Display module, for showing the content in text.
Device provided in an embodiment of the present invention, by the type based on data under purpose project project, generates corresponding head File.When the call instruction of any data is detected, the corresponding header file of any data is imported in purpose project project.By In different types of data in prescription controller can be imported into corresponding header file, so as to avoid data exposed to default In controller, the security of data is improve.
Secondly as being frequently necessary to the publicly-owned data such as the publicly-owned header file that calls puts into corresponding PCH, So as to subsequently without repeating to import these publicly-owned data, PCH only need to be quoted, so as to improve follow-up code Speed during compiling, reduces code redundancy.
From secondary, by the order line command based on user input, current operation catalogue is navigated to, and operation catalogue is made It is purpose project catalogue.Search the corresponding file destination of specified file suffix name under purpose project catalogue.In determining lookup result The unreferenced file destination of purpose project item code, deletes unreferenced file destination.Due to file suffixes can be directly based upon Name, determines which discarded record is not cited and needs to be deleted.Therefore, file delete when accuracy rate it is higher, effect compared with It is good.
Further, since can be unified to delete all of discarded record by way of perform script file, so as to improve text Efficiency when part is deleted.
Finally, due to when the file of specified file suffix name is searched, matched by regular expression, compared to String matching, the compiling efficiency of bottom compiler is higher, so as to further increasing efficiency when file is deleted.
Finally, the present processes are only preferably embodiment, are not intended to limit the scope of the present invention.It is all Within the spirit and principles in the present invention, any modification, equivalent substitution and improvements made etc. should be included in protection of the invention Within the scope of.

Claims (10)

1. a kind of data managing method, it is characterised in that methods described includes:
Based on the type of data under purpose project project, corresponding header file is generated, the purpose project project is application and development Engineering project;
When the call instruction of any data is detected, the corresponding head of any data is imported in the purpose project project File.
2. method according to claim 1, it is characterised in that the data include proprietary macrodefinition, the constant of prescription controller Or enumerated variable, the type of data under the project based on purpose project, before generating corresponding header file, including:
Based on the first instruction for creating header file, the first header file is created;
The type of data under the project based on purpose project, generates corresponding header file, including:
The proprietary macrodefinition of the prescription controller, constant or enumerated variable are imported into first header file.
3. method according to claim 1, it is characterised in that the data are the classification header file or non-that prescription controller is relied on Classification header file, the type of data under the project based on purpose project, before generating corresponding header file, including:
Based on the second instruction for creating header file, the second header file is created;
Based on the 3rd instruction for creating header file, the 3rd header file is created;
The type of data under the project based on purpose project, generates corresponding header file, including:
Content in the classification header file that the prescription controller is relied on, imported into second header file;
Content in the non-categorical header file that the prescription controller is relied on, imported into the 3rd header file.
4. method according to claim 1, it is characterised in that the data are property value, under the project based on purpose project The type of data, generates corresponding header file, including:
Determine the corresponding class of the property value;
The property value is imported into the corresponding header file of the class.
5. method according to claim 1, it is characterised in that the data are publicly-owned macrodefinition, publicly-owned constant, publicly-owned enumerate change Amount or publicly-owned header file, the type of data under the project based on purpose project generate corresponding header file, including:
According to the title of purpose project project, PCH is created;
Content in the publicly-owned macrodefinition, the publicly-owned constant, the publicly-owned enumerated variable or the publicly-owned header file is led Enter in the PCH.
6. method according to claim 1, it is characterised in that methods described also includes:
The corresponding file destination of specified file suffix name under purpose project catalogue is searched, the purpose project catalogue is the target The corresponding engineering catalogue of engineering project;
Determine the unreferenced file destination of purpose project item code in lookup result;
Delete unreferenced file destination.
7. method according to claim 6, it is characterised in that specified file suffix name under the lookup purpose project catalogue Before corresponding file destination, including:
Order line command based on user input, navigates to current operation catalogue, and operate catalogue as the mesh using described Mark engineering catalogue.
8. method according to claim 6, it is characterised in that specified file suffix name under the lookup purpose project catalogue Corresponding file destination, including:
Based on default regular expression, the fileinfo of file under purpose project catalogue is carried out with the specified file suffix name Matching, using the file that the match is successful as file destination;
According to the corresponding fileinfo generation fileinfo list of file destination, and as lookup result.
9. the method according to claim 6 or 8, it is characterised in that purpose project project generation in the determination lookup result The unreferenced file destination of code, including:
For the corresponding either objective file of any fileinfo in the fileinfo list, the purpose project project is searched Whether any fileinfo is included in code;
When comprising any fileinfo, determine that the purpose project item code quotes the either objective file;
When not comprising any fileinfo, the unreferenced either objective text of the purpose project item code is determined Part.
10. a kind of data administrator, it is characterised in that described device includes:
First generation module, for the type based on data under purpose project project, generates corresponding header file, the target work Journey project is application and development engineering project;
Import modul, for when the call instruction of any data is detected, described appointing being imported in the purpose project project The corresponding header file of one data.
CN201611199260.1A 2016-12-22 2016-12-22 Data managing method and device Pending CN106843992A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611199260.1A CN106843992A (en) 2016-12-22 2016-12-22 Data managing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611199260.1A CN106843992A (en) 2016-12-22 2016-12-22 Data managing method and device

Publications (1)

Publication Number Publication Date
CN106843992A true CN106843992A (en) 2017-06-13

Family

ID=59136843

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611199260.1A Pending CN106843992A (en) 2016-12-22 2016-12-22 Data managing method and device

Country Status (1)

Country Link
CN (1) CN106843992A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577527A (en) * 2017-08-30 2018-01-12 北京金山安全软件有限公司 Task generation and scheduling method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070094650A1 (en) * 2005-10-20 2007-04-26 Cisco Technology, Inc. Method and system for optimizing source code
CN103530117A (en) * 2013-09-30 2014-01-22 山西云途信息技术有限公司 Method and device for adapting to screens, of different sizes, of mobile terminals
CN104636136A (en) * 2015-01-12 2015-05-20 沈文策 Group simulation method based on Plain type of UITableView in iOS system
CN105677366A (en) * 2016-02-26 2016-06-15 四川长虹电器股份有限公司 Method for achieving infinite circulating rolling selection based on UITableView in iOS

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070094650A1 (en) * 2005-10-20 2007-04-26 Cisco Technology, Inc. Method and system for optimizing source code
CN103530117A (en) * 2013-09-30 2014-01-22 山西云途信息技术有限公司 Method and device for adapting to screens, of different sizes, of mobile terminals
CN104636136A (en) * 2015-01-12 2015-05-20 沈文策 Group simulation method based on Plain type of UITableView in iOS system
CN105677366A (en) * 2016-02-26 2016-06-15 四川长虹电器股份有限公司 Method for achieving infinite circulating rolling selection based on UITableView in iOS

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
LIWONDERFULL: "《ios宏定义的使用与规范》", 《简书》 *
UNIQHJ: "《ios分类的基本使用(更改frame)以及全局变量.pch的使用》", 《CSDN》 *
浮生猎趣: "《查找XCode工程中没被使用的图片资源》", 《浮生猎趣》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107577527A (en) * 2017-08-30 2018-01-12 北京金山安全软件有限公司 Task generation and scheduling method and device

Similar Documents

Publication Publication Date Title
CN1120433C (en) Method and device for generating application data and storage medium containing thereon
US9760347B2 (en) Method and system to identify GUI objects for non-markup-language-presented applications
CN103049458B (en) A kind of method and system revising user thesaurus
CN1808377A (en) Application-generic sequence diagram generator driven by a non-proprietary language
CN108762743B (en) Data table operation code generation method and device
US11556502B2 (en) Intelligent routing based on the data extraction from the document
JP2009508232A (en) Annotating documents in collaborative applications with data from different information systems
CN105631393A (en) Information recognition method and device
CN1497475A (en) System and method for displaying and selecting hierarchical data buse segment and field
CN103597469A (en) Live browser tooling in an integrated development environment
US11182439B2 (en) Automatic data capture of desired data fields and generation of metadata based on captured data fields
JP4502615B2 (en) Similar sentence search device, similar sentence search method, and program
US9069883B2 (en) Document management method and document management apparatus using the same
CN110309386B (en) Method and device for crawling web page
JP2023027194A (en) Translation method, apparatus, electronic device, readable storage medium and computer program
JP2015076064A (en) Information processing device, information processing method, program, and storage medium
CN105630748A (en) Information processing device and information processing method
CN106843992A (en) Data managing method and device
US20090300001A1 (en) Server apparatus, catalog processing method, and computer-readable storage medium
US9176954B2 (en) Information processing apparatus, information processing method, and non-transitory computer readable medium for presenting associated information upon selection of information
WO2014130700A2 (en) Systems and methods for organizing, classifying, and discovering automatically generated computer software
CN104063367A (en) Annotation search apparatus, method and program
JPWO2012053509A1 (en) Input support program, input support apparatus, and input support method
JP2008052439A (en) Image processing system and image processing program
US20210342181A1 (en) Workflow data migration management

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170613